var aw=Object.defineProperty;var fh=n=>{throw TypeError(n)};var lw=(n,t,s)=>t in n?aw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[t]=s;var Le=(n,t,s)=>lw(n,typeof t!="symbol"?t+"":t,s),Bu=(n,t,s)=>t.has(n)||fh("Cannot "+s);var R=(n,t,s)=>(Bu(n,t,"read from private field"),s?s.call(n):t.get(n)),he=(n,t,s)=>t.has(n)?fh("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(n):t.set(n,s),ee=(n,t,s,o)=>(Bu(n,t,"write to private field"),o?o.call(n,s):t.set(n,s),s),Ne=(n,t,s)=>(Bu(n,t,"access private method"),s);var wa=(n,t,s,o)=>({set _(a){ee(n,t,a,s)},get _(){return R(n,t,o)}});function uw(n,t){for(var s=0;so[a]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))o(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function s(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function o(a){if(a.ep)return;a.ep=!0;const u=s(a);fetch(a.href,u)}})();function Hc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zu={exports:{}},Lo={},$u={exports:{}},Ce={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ph;function cw(){if(ph)return Ce;ph=1;var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),w=Symbol.iterator;function k(P){return P===null||typeof P!="object"?null:(P=w&&P[w]||P["@@iterator"],typeof P=="function"?P:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,_={};function x(P,B,ce){this.props=P,this.context=B,this.refs=_,this.updater=ce||j}x.prototype.isReactComponent={},x.prototype.setState=function(P,B){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,B,"setState")},x.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function S(){}S.prototype=x.prototype;function L(P,B,ce){this.props=P,this.context=B,this.refs=_,this.updater=ce||j}var N=L.prototype=new S;N.constructor=L,M(N,x.prototype),N.isPureReactComponent=!0;var A=Array.isArray,V=Object.prototype.hasOwnProperty,$={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function z(P,B,ce){var me,pe={},Y=null,ve=null;if(B!=null)for(me in B.ref!==void 0&&(ve=B.ref),B.key!==void 0&&(Y=""+B.key),B)V.call(B,me)&&!G.hasOwnProperty(me)&&(pe[me]=B[me]);var Re=arguments.length-2;if(Re===1)pe.children=ce;else if(1>>1,B=K[P];if(0>>1;Pa(pe,U))Ya(ve,pe)?(K[P]=ve,K[Y]=U,P=Y):(K[P]=pe,K[me]=U,P=me);else if(Ya(ve,U))K[P]=ve,K[Y]=U,P=Y;else break e}}return ae}function a(K,ae){var U=K.sortIndex-ae.sortIndex;return U!==0?U:K.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var d=Date,p=d.now();n.unstable_now=function(){return d.now()-p}}var h=[],m=[],v=1,w=null,k=3,j=!1,M=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(K){for(var ae=s(m);ae!==null;){if(ae.callback===null)o(m);else if(ae.startTime<=K)o(m),ae.sortIndex=ae.expirationTime,t(h,ae);else break;ae=s(m)}}function A(K){if(_=!1,N(K),!M)if(s(h)!==null)M=!0,Se(V);else{var ae=s(m);ae!==null&&_e(A,ae.startTime-K)}}function V(K,ae){M=!1,_&&(_=!1,S(z),z=-1),j=!0;var U=k;try{for(N(ae),w=s(h);w!==null&&(!(w.expirationTime>ae)||K&&!Ee());){var P=w.callback;if(typeof P=="function"){w.callback=null,k=w.priorityLevel;var B=P(w.expirationTime<=ae);ae=n.unstable_now(),typeof B=="function"?w.callback=B:w===s(h)&&o(h),N(ae)}else o(h);w=s(h)}if(w!==null)var ce=!0;else{var me=s(m);me!==null&&_e(A,me.startTime-ae),ce=!1}return ce}finally{w=null,k=U,j=!1}}var $=!1,G=null,z=-1,ie=5,ue=-1;function Ee(){return!(n.unstable_now()-ueK||125P?(K.sortIndex=U,t(m,K),s(h)===null&&K===s(m)&&(_?(S(z),z=-1):_=!0,_e(A,U-P))):(K.sortIndex=B,t(h,K),M||j||(M=!0,Se(V))),K},n.unstable_shouldYield=Ee,n.unstable_wrapCallback=function(K){var ae=k;return function(){var U=k;k=ae;try{return K.apply(this,arguments)}finally{k=U}}}})(Hu)),Hu}var vh;function hw(){return vh||(vh=1,Wu.exports=pw()),Wu.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var wh;function mw(){if(wh)return Tt;wh=1;var n=qc(),t=hw();function s(e){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+e,i=1;i"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},w={};function k(e){return h.call(w,e)?!0:h.call(v,e)?!1:m.test(e)?w[e]=!0:(v[e]=!0,!1)}function j(e,r,i,l){if(i!==null&&i.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return l?!1:i!==null?!i.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function M(e,r,i,l){if(r===null||typeof r>"u"||j(e,r,i,l))return!0;if(l)return!1;if(i!==null)switch(i.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function _(e,r,i,l,c,f,y){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=i,this.propertyName=e,this.type=r,this.sanitizeURL=f,this.removeEmptyString=y}var x={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){x[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var r=e[0];x[r]=new _(r,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){x[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){x[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){x[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){x[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){x[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){x[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){x[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function L(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var r=e.replace(S,L);x[r]=new _(r,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var r=e.replace(S,L);x[r]=new _(r,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var r=e.replace(S,L);x[r]=new _(r,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){x[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),x.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){x[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function N(e,r,i,l){var c=x.hasOwnProperty(r)?x[r]:null;(c!==null?c.type!==0:l||!(2E||c[y]!==f[E]){var C=` `+c[y].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=y&&0<=E);break}}}finally{ce=!1,Error.prepareStackTrace=i}return(e=e?e.displayName||e.name:"")?B(e):""}function pe(e){switch(e.tag){case 5:return B(e.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return e=me(e.type,!1),e;case 11:return e=me(e.type.render,!1),e;case 1:return e=me(e.type,!0),e;default:return""}}function Y(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case $:return"Portal";case ie:return"Profiler";case z:return"StrictMode";case xe:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ee:return(e.displayName||"Context")+".Consumer";case ue:return(e._context.displayName||"Context")+".Provider";case Te:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case be:return r=e.displayName||null,r!==null?r:Y(e.type)||"Memo";case Se:r=e._payload,e=e._init;try{return Y(e(r))}catch{}}return null}function ve(e){var r=e.type;switch(e.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=r.render,e=e.displayName||e.name||"",r.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Y(r);case 8:return r===z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ye(e){var r=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function tt(e){var r=ye(e)?"checked":"value",i=Object.getOwnPropertyDescriptor(e.constructor.prototype,r),l=""+e[r];if(!e.hasOwnProperty(r)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,f=i.set;return Object.defineProperty(e,r,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,f.call(this,y)}}),Object.defineProperty(e,r,{enumerable:i.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[r]}}}}function Ft(e){e._valueTracker||(e._valueTracker=tt(e))}function it(e){if(!e)return!1;var r=e._valueTracker;if(!r)return!0;var i=r.getValue(),l="";return e&&(l=ye(e)?e.checked?"true":"false":e.value),e=l,e!==i?(r.setValue(e),!0):!1}function Xt(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Mt(e,r){var i=r.checked;return U({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:i??e._wrapperState.initialChecked})}function Ut(e,r){var i=r.defaultValue==null?"":r.defaultValue,l=r.checked!=null?r.checked:r.defaultChecked;i=Re(r.value!=null?r.value:i),e._wrapperState={initialChecked:l,initialValue:i,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function we(e,r){r=r.checked,r!=null&&N(e,"checked",r,!1)}function at(e,r){we(e,r);var i=Re(r.value),l=r.type;if(i!=null)l==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+i):e.value!==""+i&&(e.value=""+i);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}r.hasOwnProperty("value")?Zt(e,r.type,i):r.hasOwnProperty("defaultValue")&&Zt(e,r.type,Re(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(e.defaultChecked=!!r.defaultChecked)}function Jt(e,r,i){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var l=r.type;if(!(l!=="submit"&&l!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+e._wrapperState.initialValue,i||r===e.value||(e.value=r),e.defaultValue=r}i=e.name,i!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,i!==""&&(e.name=i)}function Zt(e,r,i){(r!=="number"||Xt(e.ownerDocument)!==e)&&(i==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+i&&(e.defaultValue=""+i))}var Fn=Array.isArray;function Mn(e,r,i,l){if(e=e.options,r){r={};for(var c=0;c"+r.valueOf().toString()+"",r=di.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;r.firstChild;)e.appendChild(r.firstChild)}});function Gs(e,r){if(r){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=r;return}}e.textContent=r}var Ys={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},dv=["Webkit","ms","Moz","O"];Object.keys(Ys).forEach(function(e){dv.forEach(function(r){r=r+e.charAt(0).toUpperCase()+e.substring(1),Ys[r]=Ys[e]})});function Cd(e,r,i){return r==null||typeof r=="boolean"||r===""?"":i||typeof r!="number"||r===0||Ys.hasOwnProperty(e)&&Ys[e]?(""+r).trim():r+"px"}function Rd(e,r){e=e.style;for(var i in r)if(r.hasOwnProperty(i)){var l=i.indexOf("--")===0,c=Cd(i,r[i],l);i==="float"&&(i="cssFloat"),l?e.setProperty(i,c):e[i]=c}}var fv=U({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ja(e,r){if(r){if(fv[e]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(s(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(s(61))}if(r.style!=null&&typeof r.style!="object")throw Error(s(62))}}function Za(e,r){if(e.indexOf("-")===-1)return typeof r.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var el=null;function tl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nl=null,ss=null,os=null;function Td(e){if(e=wo(e)){if(typeof nl!="function")throw Error(s(280));var r=e.stateNode;r&&(r=Li(r),nl(e.stateNode,e.type,r))}}function Nd(e){ss?os?os.push(e):os=[e]:ss=e}function Pd(){if(ss){var e=ss,r=os;if(os=ss=null,Td(e),r)for(e=0;e>>=0,e===0?32:31-(bv(e)/_v|0)|0}var gi=64,yi=4194304;function eo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vi(e,r){var i=e.pendingLanes;if(i===0)return 0;var l=0,c=e.suspendedLanes,f=e.pingedLanes,y=i&268435455;if(y!==0){var E=y&~c;E!==0?l=eo(E):(f&=y,f!==0&&(l=eo(f)))}else y=i&~c,y!==0?l=eo(y):f!==0&&(l=eo(f));if(l===0)return 0;if(r!==0&&r!==l&&(r&c)===0&&(c=l&-l,f=r&-r,c>=f||c===16&&(f&4194240)!==0))return r;if((l&4)!==0&&(l|=i&16),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=l;0i;i++)r.push(e);return r}function to(e,r,i){e.pendingLanes|=r,r!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,r=31-en(r),e[r]=i}function Tv(e,r){var i=e.pendingLanes&~r;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=r,e.mutableReadLanes&=r,e.entangledLanes&=r,r=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0=uo),sf=" ",of=!1;function af(e,r){switch(e){case"keyup":return n0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ls=!1;function s0(e,r){switch(e){case"compositionend":return lf(r);case"keypress":return r.which!==32?null:(of=!0,sf);case"textInput":return e=r.data,e===sf&&of?null:e;default:return null}}function o0(e,r){if(ls)return e==="compositionend"||!xl&&af(e,r)?(e=Jd(),bi=hl=Vn=null,ls=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:i,offset:r-e};e=l}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=mf(i)}}function yf(e,r){return e&&r?e===r?!0:e&&e.nodeType===3?!1:r&&r.nodeType===3?yf(e,r.parentNode):"contains"in e?e.contains(r):e.compareDocumentPosition?!!(e.compareDocumentPosition(r)&16):!1:!1}function vf(){for(var e=window,r=Xt();r instanceof e.HTMLIFrameElement;){try{var i=typeof r.contentWindow.location.href=="string"}catch{i=!1}if(i)e=r.contentWindow;else break;r=Xt(e.document)}return r}function bl(e){var r=e&&e.nodeName&&e.nodeName.toLowerCase();return r&&(r==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||r==="textarea"||e.contentEditable==="true")}function h0(e){var r=vf(),i=e.focusedElem,l=e.selectionRange;if(r!==i&&i&&i.ownerDocument&&yf(i.ownerDocument.documentElement,i)){if(l!==null&&bl(i)){if(r=l.start,e=l.end,e===void 0&&(e=r),"selectionStart"in i)i.selectionStart=r,i.selectionEnd=Math.min(e,i.value.length);else if(e=(r=i.ownerDocument||document)&&r.defaultView||window,e.getSelection){e=e.getSelection();var c=i.textContent.length,f=Math.min(l.start,c);l=l.end===void 0?f:Math.min(l.end,c),!e.extend&&f>l&&(c=l,l=f,f=c),c=gf(i,f);var y=gf(i,l);c&&y&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(r=r.createRange(),r.setStart(c.node,c.offset),e.removeAllRanges(),f>l?(e.addRange(r),e.extend(y.node,y.offset)):(r.setEnd(y.node,y.offset),e.addRange(r)))}}for(r=[],e=i;e=e.parentNode;)e.nodeType===1&&r.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i=document.documentMode,us=null,_l=null,ho=null,kl=!1;function wf(e,r,i){var l=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;kl||us==null||us!==Xt(l)||(l=us,"selectionStart"in l&&bl(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ho&&po(ho,l)||(ho=l,l=Oi(_l,"onSelect"),0hs||(e.current=Fl[hs],Fl[hs]=null,hs--)}function Me(e,r){hs++,Fl[hs]=e.current,e.current=r}var Qn={},pt=qn(Qn),bt=qn(!1),Sr=Qn;function ms(e,r){var i=e.type.contextTypes;if(!i)return Qn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===r)return l.__reactInternalMemoizedMaskedChildContext;var c={},f;for(f in i)c[f]=r[f];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=c),c}function _t(e){return e=e.childContextTypes,e!=null}function Ii(){Be(bt),Be(pt)}function Lf(e,r,i){if(pt.current!==Qn)throw Error(s(168));Me(pt,r),Me(bt,i)}function If(e,r,i){var l=e.stateNode;if(r=r.childContextTypes,typeof l.getChildContext!="function")return i;l=l.getChildContext();for(var c in l)if(!(c in r))throw Error(s(108,ve(e)||"Unknown",c));return U({},i,l)}function Di(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Qn,Sr=pt.current,Me(pt,e),Me(bt,bt.current),!0}function Df(e,r,i){var l=e.stateNode;if(!l)throw Error(s(169));i?(e=If(e,r,Sr),l.__reactInternalMemoizedMergedChildContext=e,Be(bt),Be(pt),Me(pt,e)):Be(bt),Me(bt,i)}var kn=null,Fi=!1,Ml=!1;function Ff(e){kn===null?kn=[e]:kn.push(e)}function C0(e){Fi=!0,Ff(e)}function Kn(){if(!Ml&&kn!==null){Ml=!0;var e=0,r=De;try{var i=kn;for(De=1;e>=y,c-=y,Cn=1<<32-en(r)+c|i<ge?(st=fe,fe=null):st=fe.sibling;var je=W(I,fe,D[ge],Q);if(je===null){fe===null&&(fe=st);break}e&&fe&&je.alternate===null&&r(I,fe),T=f(je,T,ge),de===null?le=je:de.sibling=je,de=je,fe=st}if(ge===D.length)return i(I,fe),ze&&_r(I,ge),le;if(fe===null){for(;gege?(st=fe,fe=null):st=fe.sibling;var rr=W(I,fe,je.value,Q);if(rr===null){fe===null&&(fe=st);break}e&&fe&&rr.alternate===null&&r(I,fe),T=f(rr,T,ge),de===null?le=rr:de.sibling=rr,de=rr,fe=st}if(je.done)return i(I,fe),ze&&_r(I,ge),le;if(fe===null){for(;!je.done;ge++,je=D.next())je=q(I,je.value,Q),je!==null&&(T=f(je,T,ge),de===null?le=je:de.sibling=je,de=je);return ze&&_r(I,ge),le}for(fe=l(I,fe);!je.done;ge++,je=D.next())je=Z(fe,I,ge,je.value,Q),je!==null&&(e&&je.alternate!==null&&fe.delete(je.key===null?ge:je.key),T=f(je,T,ge),de===null?le=je:de.sibling=je,de=je);return e&&fe.forEach(function(iw){return r(I,iw)}),ze&&_r(I,ge),le}function Qe(I,T,D,Q){if(typeof D=="object"&&D!==null&&D.type===G&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case V:e:{for(var le=D.key,de=T;de!==null;){if(de.key===le){if(le=D.type,le===G){if(de.tag===7){i(I,de.sibling),T=c(de,D.props.children),T.return=I,I=T;break e}}else if(de.elementType===le||typeof le=="object"&&le!==null&&le.$$typeof===Se&&Vf(le)===de.type){i(I,de.sibling),T=c(de,D.props),T.ref=xo(I,de,D),T.return=I,I=T;break e}i(I,de);break}else r(I,de);de=de.sibling}D.type===G?(T=Ar(D.props.children,I.mode,Q,D.key),T.return=I,I=T):(Q=da(D.type,D.key,D.props,null,I.mode,Q),Q.ref=xo(I,T,D),Q.return=I,I=Q)}return y(I);case $:e:{for(de=D.key;T!==null;){if(T.key===de)if(T.tag===4&&T.stateNode.containerInfo===D.containerInfo&&T.stateNode.implementation===D.implementation){i(I,T.sibling),T=c(T,D.children||[]),T.return=I,I=T;break e}else{i(I,T);break}else r(I,T);T=T.sibling}T=Iu(D,I.mode,Q),T.return=I,I=T}return y(I);case Se:return de=D._init,Qe(I,T,de(D._payload),Q)}if(Fn(D))return ne(I,T,D,Q);if(ae(D))return oe(I,T,D,Q);zi(I,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,T!==null&&T.tag===6?(i(I,T.sibling),T=c(T,D),T.return=I,I=T):(i(I,T),T=Lu(D,I.mode,Q),T.return=I,I=T),y(I)):i(I,T)}return Qe}var ws=Wf(!0),Hf=Wf(!1),$i=qn(null),Vi=null,xs=null,Wl=null;function Hl(){Wl=xs=Vi=null}function ql(e){var r=$i.current;Be($i),e._currentValue=r}function Ql(e,r,i){for(;e!==null;){var l=e.alternate;if((e.childLanes&r)!==r?(e.childLanes|=r,l!==null&&(l.childLanes|=r)):l!==null&&(l.childLanes&r)!==r&&(l.childLanes|=r),e===i)break;e=e.return}}function Es(e,r){Vi=e,Wl=xs=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&r)!==0&&(kt=!0),e.firstContext=null)}function $t(e){var r=e._currentValue;if(Wl!==e)if(e={context:e,memoizedValue:r,next:null},xs===null){if(Vi===null)throw Error(s(308));xs=e,Vi.dependencies={lanes:0,firstContext:e}}else xs=xs.next=e;return r}var kr=null;function Kl(e){kr===null?kr=[e]:kr.push(e)}function qf(e,r,i,l){var c=r.interleaved;return c===null?(i.next=i,Kl(r)):(i.next=c.next,c.next=i),r.interleaved=i,Tn(e,l)}function Tn(e,r){e.lanes|=r;var i=e.alternate;for(i!==null&&(i.lanes|=r),i=e,e=e.return;e!==null;)e.childLanes|=r,i=e.alternate,i!==null&&(i.childLanes|=r),i=e,e=e.return;return i.tag===3?i.stateNode:null}var Gn=!1;function Gl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qf(e,r){e=e.updateQueue,r.updateQueue===e&&(r.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Nn(e,r){return{eventTime:e,lane:r,tag:0,payload:null,callback:null,next:null}}function Yn(e,r,i){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ae&2)!==0){var c=l.pending;return c===null?r.next=r:(r.next=c.next,c.next=r),l.pending=r,Tn(e,i)}return c=l.interleaved,c===null?(r.next=r,Kl(l)):(r.next=c.next,c.next=r),l.interleaved=r,Tn(e,i)}function Wi(e,r,i){if(r=r.updateQueue,r!==null&&(r=r.shared,(i&4194240)!==0)){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,ul(e,i)}}function Kf(e,r){var i=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,i===l)){var c=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var y={eventTime:i.eventTime,lane:i.lane,tag:i.tag,payload:i.payload,callback:i.callback,next:null};f===null?c=f=y:f=f.next=y,i=i.next}while(i!==null);f===null?c=f=r:f=f.next=r}else c=f=r;i={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:f,shared:l.shared,effects:l.effects},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=r:e.next=r,i.lastBaseUpdate=r}function Hi(e,r,i,l){var c=e.updateQueue;Gn=!1;var f=c.firstBaseUpdate,y=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var C=E,F=C.next;C.next=null,y===null?f=F:y.next=F,y=C;var H=e.alternate;H!==null&&(H=H.updateQueue,E=H.lastBaseUpdate,E!==y&&(E===null?H.firstBaseUpdate=F:E.next=F,H.lastBaseUpdate=C))}if(f!==null){var q=c.baseState;y=0,H=F=C=null,E=f;do{var W=E.lane,Z=E.eventTime;if((l&W)===W){H!==null&&(H=H.next={eventTime:Z,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var ne=e,oe=E;switch(W=r,Z=i,oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){q=ne.call(Z,q,W);break e}q=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,W=typeof ne=="function"?ne.call(Z,q,W):ne,W==null)break e;q=U({},q,W);break e;case 2:Gn=!0}}E.callback!==null&&E.lane!==0&&(e.flags|=64,W=c.effects,W===null?c.effects=[E]:W.push(E))}else Z={eventTime:Z,lane:W,tag:E.tag,payload:E.payload,callback:E.callback,next:null},H===null?(F=H=Z,C=q):H=H.next=Z,y|=W;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;W=E,E=W.next,W.next=null,c.lastBaseUpdate=W,c.shared.pending=null}}while(!0);if(H===null&&(C=q),c.baseState=C,c.firstBaseUpdate=F,c.lastBaseUpdate=H,r=c.shared.interleaved,r!==null){c=r;do y|=c.lane,c=c.next;while(c!==r)}else f===null&&(c.shared.lanes=0);Tr|=y,e.lanes=y,e.memoizedState=q}}function Gf(e,r,i){if(e=r.effects,r.effects=null,e!==null)for(r=0;ri?i:4,e(!0);var l=eu.transition;eu.transition={};try{e(!1),r()}finally{De=i,eu.transition=l}}function hp(){return Vt().memoizedState}function P0(e,r,i){var l=er(e);if(i={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null},mp(e))gp(r,i);else if(i=qf(e,r,i,l),i!==null){var c=Et();an(i,e,l,c),yp(i,r,l)}}function O0(e,r,i){var l=er(e),c={lane:l,action:i,hasEagerState:!1,eagerState:null,next:null};if(mp(e))gp(r,c);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=r.lastRenderedReducer,f!==null))try{var y=r.lastRenderedState,E=f(y,i);if(c.hasEagerState=!0,c.eagerState=E,tn(E,y)){var C=r.interleaved;C===null?(c.next=c,Kl(r)):(c.next=C.next,C.next=c),r.interleaved=c;return}}catch{}finally{}i=qf(e,r,c,l),i!==null&&(c=Et(),an(i,e,l,c),yp(i,r,l))}}function mp(e){var r=e.alternate;return e===Ve||r!==null&&r===Ve}function gp(e,r){_o=Ki=!0;var i=e.pending;i===null?r.next=r:(r.next=i.next,i.next=r),e.pending=r}function yp(e,r,i){if((i&4194240)!==0){var l=r.lanes;l&=e.pendingLanes,i|=l,r.lanes=i,ul(e,i)}}var Xi={readContext:$t,useCallback:ht,useContext:ht,useEffect:ht,useImperativeHandle:ht,useInsertionEffect:ht,useLayoutEffect:ht,useMemo:ht,useReducer:ht,useRef:ht,useState:ht,useDebugValue:ht,useDeferredValue:ht,useTransition:ht,useMutableSource:ht,useSyncExternalStore:ht,useId:ht,unstable_isNewReconciler:!1},A0={readContext:$t,useCallback:function(e,r){return mn().memoizedState=[e,r===void 0?null:r],e},useContext:$t,useEffect:ip,useImperativeHandle:function(e,r,i){return i=i!=null?i.concat([e]):null,Gi(4194308,4,up.bind(null,r,e),i)},useLayoutEffect:function(e,r){return Gi(4194308,4,e,r)},useInsertionEffect:function(e,r){return Gi(4,2,e,r)},useMemo:function(e,r){var i=mn();return r=r===void 0?null:r,e=e(),i.memoizedState=[e,r],e},useReducer:function(e,r,i){var l=mn();return r=i!==void 0?i(r):r,l.memoizedState=l.baseState=r,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},l.queue=e,e=e.dispatch=P0.bind(null,Ve,e),[l.memoizedState,e]},useRef:function(e){var r=mn();return e={current:e},r.memoizedState=e},useState:sp,useDebugValue:au,useDeferredValue:function(e){return mn().memoizedState=e},useTransition:function(){var e=sp(!1),r=e[0];return e=N0.bind(null,e[1]),mn().memoizedState=e,[r,e]},useMutableSource:function(){},useSyncExternalStore:function(e,r,i){var l=Ve,c=mn();if(ze){if(i===void 0)throw Error(s(407));i=i()}else{if(i=r(),rt===null)throw Error(s(349));(Rr&30)!==0||Zf(l,r,i)}c.memoizedState=i;var f={value:i,getSnapshot:r};return c.queue=f,ip(tp.bind(null,l,f,e),[e]),l.flags|=2048,Ro(9,ep.bind(null,l,f,i,r),void 0,null),i},useId:function(){var e=mn(),r=rt.identifierPrefix;if(ze){var i=Rn,l=Cn;i=(l&~(1<<32-en(l)-1)).toString(32)+i,r=":"+r+"R"+i,i=ko++,0<\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=y.createElement(i,{is:l.is}):(e=y.createElement(i),i==="select"&&(y=e,l.multiple?y.multiple=!0:l.size&&(y.size=l.size))):e=y.createElementNS(e,i),e[pn]=r,e[vo]=l,Fp(e,r,!1,!1),r.stateNode=e;e:{switch(y=Za(i,l),i){case"dialog":Ue("cancel",e),Ue("close",e),c=l;break;case"iframe":case"object":case"embed":Ue("load",e),c=l;break;case"video":case"audio":for(c=0;cCs&&(r.flags|=128,l=!0,To(f,!1),r.lanes=4194304)}else{if(!l)if(e=qi(y),e!==null){if(r.flags|=128,l=!0,i=e.updateQueue,i!==null&&(r.updateQueue=i,r.flags|=4),To(f,!0),f.tail===null&&f.tailMode==="hidden"&&!y.alternate&&!ze)return mt(r),null}else 2*qe()-f.renderingStartTime>Cs&&i!==1073741824&&(r.flags|=128,l=!0,To(f,!1),r.lanes=4194304);f.isBackwards?(y.sibling=r.child,r.child=y):(i=f.last,i!==null?i.sibling=y:r.child=y,f.last=y)}return f.tail!==null?(r=f.tail,f.rendering=r,f.tail=r.sibling,f.renderingStartTime=qe(),r.sibling=null,i=$e.current,Me($e,l?i&1|2:i&1),r):(mt(r),null);case 22:case 23:return Ou(),l=r.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(r.flags|=8192),l&&(r.mode&1)!==0?(It&1073741824)!==0&&(mt(r),r.subtreeFlags&6&&(r.flags|=8192)):mt(r),null;case 24:return null;case 25:return null}throw Error(s(156,r.tag))}function B0(e,r){switch(Bl(r),r.tag){case 1:return _t(r.type)&&Ii(),e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 3:return Ss(),Be(bt),Be(pt),Zl(),e=r.flags,(e&65536)!==0&&(e&128)===0?(r.flags=e&-65537|128,r):null;case 5:return Xl(r),null;case 13:if(Be($e),e=r.memoizedState,e!==null&&e.dehydrated!==null){if(r.alternate===null)throw Error(s(340));vs()}return e=r.flags,e&65536?(r.flags=e&-65537|128,r):null;case 19:return Be($e),null;case 4:return Ss(),null;case 10:return ql(r.type._context),null;case 22:case 23:return Ou(),null;case 24:return null;default:return null}}var ta=!1,gt=!1,z0=typeof WeakSet=="function"?WeakSet:Set,te=null;function _s(e,r){var i=e.ref;if(i!==null)if(typeof i=="function")try{i(null)}catch(l){We(e,r,l)}else i.current=null}function wu(e,r,i){try{i()}catch(l){We(e,r,l)}}var Bp=!1;function $0(e,r){if(Ol=Ei,e=vf(),bl(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var l=i.getSelection&&i.getSelection();if(l&&l.rangeCount!==0){i=l.anchorNode;var c=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var y=0,E=-1,C=-1,F=0,H=0,q=e,W=null;t:for(;;){for(var Z;q!==i||c!==0&&q.nodeType!==3||(E=y+c),q!==f||l!==0&&q.nodeType!==3||(C=y+l),q.nodeType===3&&(y+=q.nodeValue.length),(Z=q.firstChild)!==null;)W=q,q=Z;for(;;){if(q===e)break t;if(W===i&&++F===c&&(E=y),W===f&&++H===l&&(C=y),(Z=q.nextSibling)!==null)break;q=W,W=q.parentNode}q=Z}i=E===-1||C===-1?null:{start:E,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Al={focusedElem:e,selectionRange:i},Ei=!1,te=r;te!==null;)if(r=te,e=r.child,(r.subtreeFlags&1028)!==0&&e!==null)e.return=r,te=e;else for(;te!==null;){r=te;try{var ne=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(ne!==null){var oe=ne.memoizedProps,Qe=ne.memoizedState,I=r.stateNode,T=I.getSnapshotBeforeUpdate(r.elementType===r.type?oe:rn(r.type,oe),Qe);I.__reactInternalSnapshotBeforeUpdate=T}break;case 3:var D=r.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(Q){We(r,r.return,Q)}if(e=r.sibling,e!==null){e.return=r.return,te=e;break}te=r.return}return ne=Bp,Bp=!1,ne}function No(e,r,i){var l=r.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var f=c.destroy;c.destroy=void 0,f!==void 0&&wu(r,i,f)}c=c.next}while(c!==l)}}function na(e,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.create;i.destroy=l()}i=i.next}while(i!==r)}}function xu(e){var r=e.ref;if(r!==null){var i=e.stateNode;switch(e.tag){case 5:e=i;break;default:e=i}typeof r=="function"?r(e):r.current=e}}function zp(e){var r=e.alternate;r!==null&&(e.alternate=null,zp(r)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(r=e.stateNode,r!==null&&(delete r[pn],delete r[vo],delete r[Dl],delete r[_0],delete r[k0])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function $p(e){return e.tag===5||e.tag===3||e.tag===4}function Vp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$p(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Eu(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?i.nodeType===8?i.parentNode.insertBefore(e,r):i.insertBefore(e,r):(i.nodeType===8?(r=i.parentNode,r.insertBefore(e,i)):(r=i,r.appendChild(e)),i=i._reactRootContainer,i!=null||r.onclick!==null||(r.onclick=ji));else if(l!==4&&(e=e.child,e!==null))for(Eu(e,r,i),e=e.sibling;e!==null;)Eu(e,r,i),e=e.sibling}function Su(e,r,i){var l=e.tag;if(l===5||l===6)e=e.stateNode,r?i.insertBefore(e,r):i.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(Su(e,r,i),e=e.sibling;e!==null;)Su(e,r,i),e=e.sibling}var lt=null,sn=!1;function Xn(e,r,i){for(i=i.child;i!==null;)Wp(e,r,i),i=i.sibling}function Wp(e,r,i){if(fn&&typeof fn.onCommitFiberUnmount=="function")try{fn.onCommitFiberUnmount(mi,i)}catch{}switch(i.tag){case 5:gt||_s(i,r);case 6:var l=lt,c=sn;lt=null,Xn(e,r,i),lt=l,sn=c,lt!==null&&(sn?(e=lt,i=i.stateNode,e.nodeType===8?e.parentNode.removeChild(i):e.removeChild(i)):lt.removeChild(i.stateNode));break;case 18:lt!==null&&(sn?(e=lt,i=i.stateNode,e.nodeType===8?Il(e.parentNode,i):e.nodeType===1&&Il(e,i),io(e)):Il(lt,i.stateNode));break;case 4:l=lt,c=sn,lt=i.stateNode.containerInfo,sn=!0,Xn(e,r,i),lt=l,sn=c;break;case 0:case 11:case 14:case 15:if(!gt&&(l=i.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var f=c,y=f.destroy;f=f.tag,y!==void 0&&((f&2)!==0||(f&4)!==0)&&wu(i,r,y),c=c.next}while(c!==l)}Xn(e,r,i);break;case 1:if(!gt&&(_s(i,r),l=i.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=i.memoizedProps,l.state=i.memoizedState,l.componentWillUnmount()}catch(E){We(i,r,E)}Xn(e,r,i);break;case 21:Xn(e,r,i);break;case 22:i.mode&1?(gt=(l=gt)||i.memoizedState!==null,Xn(e,r,i),gt=l):Xn(e,r,i);break;default:Xn(e,r,i)}}function Hp(e){var r=e.updateQueue;if(r!==null){e.updateQueue=null;var i=e.stateNode;i===null&&(i=e.stateNode=new z0),r.forEach(function(l){var c=X0.bind(null,e,l);i.has(l)||(i.add(l),l.then(c,c))})}}function on(e,r){var i=r.deletions;if(i!==null)for(var l=0;lc&&(c=y),l&=~f}if(l=c,l=qe()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*W0(l/1960))-l,10e?16:e,Zn===null)var l=!1;else{if(e=Zn,Zn=null,aa=0,(Ae&6)!==0)throw Error(s(331));var c=Ae;for(Ae|=4,te=e.current;te!==null;){var f=te,y=f.child;if((te.flags&16)!==0){var E=f.deletions;if(E!==null){for(var C=0;Cqe()-ku?Pr(e,0):_u|=i),Rt(e,r)}function sh(e,r){r===0&&((e.mode&1)===0?r=1:(r=yi,yi<<=1,(yi&130023424)===0&&(yi=4194304)));var i=Et();e=Tn(e,r),e!==null&&(to(e,r,i),Rt(e,i))}function Y0(e){var r=e.memoizedState,i=0;r!==null&&(i=r.retryLane),sh(e,i)}function X0(e,r){var i=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(s(314))}l!==null&&l.delete(r),sh(e,i)}var oh;oh=function(e,r,i){if(e!==null)if(e.memoizedProps!==r.pendingProps||bt.current)kt=!0;else{if((e.lanes&i)===0&&(r.flags&128)===0)return kt=!1,M0(e,r,i);kt=(e.flags&131072)!==0}else kt=!1,ze&&(r.flags&1048576)!==0&&Mf(r,Ui,r.index);switch(r.lanes=0,r.tag){case 2:var l=r.type;ea(e,r),e=r.pendingProps;var c=ms(r,pt.current);Es(r,i),c=nu(null,r,l,e,c,i);var f=ru();return r.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,_t(l)?(f=!0,Di(r)):f=!1,r.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Gl(r),c.updater=Ji,r.stateNode=c,c._reactInternals=r,uu(r,l,e,i),r=pu(null,r,l,!0,f,i)):(r.tag=0,ze&&f&&Ul(r),xt(null,r,c,i),r=r.child),r;case 16:l=r.elementType;e:{switch(ea(e,r),e=r.pendingProps,c=l._init,l=c(l._payload),r.type=l,c=r.tag=Z0(l),e=rn(l,e),c){case 0:r=fu(null,r,l,e,i);break e;case 1:r=Op(null,r,l,e,i);break e;case 11:r=Cp(null,r,l,e,i);break e;case 14:r=Rp(null,r,l,rn(l.type,e),i);break e}throw Error(s(306,l,""))}return r;case 0:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),fu(e,r,l,c,i);case 1:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Op(e,r,l,c,i);case 3:e:{if(Ap(r),e===null)throw Error(s(387));l=r.pendingProps,f=r.memoizedState,c=f.element,Qf(e,r),Hi(r,l,null,i);var y=r.memoizedState;if(l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},r.updateQueue.baseState=f,r.memoizedState=f,r.flags&256){c=bs(Error(s(423)),r),r=jp(e,r,l,i,c);break e}else if(l!==c){c=bs(Error(s(424)),r),r=jp(e,r,l,i,c);break e}else for(Lt=Hn(r.stateNode.containerInfo.firstChild),jt=r,ze=!0,nn=null,i=Hf(r,null,l,i),r.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(vs(),l===c){r=Pn(e,r,i);break e}xt(e,r,l,i)}r=r.child}return r;case 5:return Yf(r),e===null&&$l(r),l=r.type,c=r.pendingProps,f=e!==null?e.memoizedProps:null,y=c.children,jl(l,c)?y=null:f!==null&&jl(l,f)&&(r.flags|=32),Pp(e,r),xt(e,r,y,i),r.child;case 6:return e===null&&$l(r),null;case 13:return Lp(e,r,i);case 4:return Yl(r,r.stateNode.containerInfo),l=r.pendingProps,e===null?r.child=ws(r,null,l,i):xt(e,r,l,i),r.child;case 11:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),Cp(e,r,l,c,i);case 7:return xt(e,r,r.pendingProps,i),r.child;case 8:return xt(e,r,r.pendingProps.children,i),r.child;case 12:return xt(e,r,r.pendingProps.children,i),r.child;case 10:e:{if(l=r.type._context,c=r.pendingProps,f=r.memoizedProps,y=c.value,Me($i,l._currentValue),l._currentValue=y,f!==null)if(tn(f.value,y)){if(f.children===c.children&&!bt.current){r=Pn(e,r,i);break e}}else for(f=r.child,f!==null&&(f.return=r);f!==null;){var E=f.dependencies;if(E!==null){y=f.child;for(var C=E.firstContext;C!==null;){if(C.context===l){if(f.tag===1){C=Nn(-1,i&-i),C.tag=2;var F=f.updateQueue;if(F!==null){F=F.shared;var H=F.pending;H===null?C.next=C:(C.next=H.next,H.next=C),F.pending=C}}f.lanes|=i,C=f.alternate,C!==null&&(C.lanes|=i),Ql(f.return,i,r),E.lanes|=i;break}C=C.next}}else if(f.tag===10)y=f.type===r.type?null:f.child;else if(f.tag===18){if(y=f.return,y===null)throw Error(s(341));y.lanes|=i,E=y.alternate,E!==null&&(E.lanes|=i),Ql(y,i,r),y=f.sibling}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===r){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}xt(e,r,c.children,i),r=r.child}return r;case 9:return c=r.type,l=r.pendingProps.children,Es(r,i),c=$t(c),l=l(c),r.flags|=1,xt(e,r,l,i),r.child;case 14:return l=r.type,c=rn(l,r.pendingProps),c=rn(l.type,c),Rp(e,r,l,c,i);case 15:return Tp(e,r,r.type,r.pendingProps,i);case 17:return l=r.type,c=r.pendingProps,c=r.elementType===l?c:rn(l,c),ea(e,r),r.tag=1,_t(l)?(e=!0,Di(r)):e=!1,Es(r,i),wp(r,l,c),uu(r,l,c,i),pu(null,r,l,!0,e,i);case 19:return Dp(e,r,i);case 22:return Np(e,r,i)}throw Error(s(156,r.tag))};function ih(e,r){return Md(e,r)}function J0(e,r,i,l){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ht(e,r,i,l){return new J0(e,r,i,l)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Z0(e){if(typeof e=="function")return ju(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Te)return 11;if(e===be)return 14}return 2}function nr(e,r){var i=e.alternate;return i===null?(i=Ht(e.tag,r,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=r,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&14680064,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,r=e.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i}function da(e,r,i,l,c,f){var y=2;if(l=e,typeof e=="function")ju(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case G:return Ar(i.children,c,f,r);case z:y=8,c|=8;break;case ie:return e=Ht(12,i,r,c|2),e.elementType=ie,e.lanes=f,e;case xe:return e=Ht(13,i,r,c),e.elementType=xe,e.lanes=f,e;case J:return e=Ht(19,i,r,c),e.elementType=J,e.lanes=f,e;case _e:return fa(i,c,f,r);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ue:y=10;break e;case Ee:y=9;break e;case Te:y=11;break e;case be:y=14;break e;case Se:y=16,l=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return r=Ht(y,i,r,c),r.elementType=e,r.type=l,r.lanes=f,r}function Ar(e,r,i,l){return e=Ht(7,e,l,r),e.lanes=i,e}function fa(e,r,i,l){return e=Ht(22,e,l,r),e.elementType=_e,e.lanes=i,e.stateNode={isHidden:!1},e}function Lu(e,r,i){return e=Ht(6,e,null,r),e.lanes=i,e}function Iu(e,r,i){return r=Ht(4,e.children!==null?e.children:[],e.key,r),r.lanes=i,r.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},r}function ew(e,r,i,l,c){this.tag=r,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ll(0),this.expirationTimes=ll(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ll(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function Du(e,r,i,l,c,f,y,E,C){return e=new ew(e,r,i,E,C),r===1?(r=1,f===!0&&(r|=8)):r=0,f=Ht(3,null,null,r),e.current=f,f.stateNode=e,f.memoizedState={element:l,isDehydrated:i,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gl(f),e}function tw(e,r,i){var l=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(t){console.error(t)}}return n(),Vu.exports=mw(),Vu.exports}var Eh;function gw(){if(Eh)return xa;Eh=1;var n=ng();return xa.createRoot=n.createRoot,xa.hydrateRoot=n.hydrateRoot,xa}var yw=gw();const vw=Hc(yw),ww=20,xw=1e6,Dn={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let qu=0;function Ew(){return qu=(qu+1)%Number.MAX_VALUE,qu.toString()}const Qu=new Map,Sh=n=>{if(Qu.has(n))return;const t=setTimeout(()=>{Qu.delete(n),Wo({type:Dn.REMOVE_TOAST,toastId:n})},xw);Qu.set(n,t)},Sw=(n,t)=>{switch(t.type){case Dn.ADD_TOAST:return{...n,toasts:[t.toast,...n.toasts].slice(0,ww)};case Dn.UPDATE_TOAST:return{...n,toasts:n.toasts.map(s=>s.id===t.toast.id?{...s,...t.toast}:s)};case Dn.DISMISS_TOAST:{const{toastId:s}=t;return s?Sh(s):n.toasts.forEach(o=>{Sh(o.id)}),{...n,toasts:n.toasts.map(o=>o.id===s||s===void 0?{...o,open:!1}:o)}}case Dn.REMOVE_TOAST:return t.toastId===void 0?{...n,toasts:[]}:{...n,toasts:n.toasts.filter(s=>s.id!==t.toastId)}}},Pa=[];let Oa={toasts:[]};function Wo(n){Oa=Sw(Oa,n),Pa.forEach(t=>{t(Oa)})}function bw({...n}){const t=Ew(),s=a=>Wo({type:Dn.UPDATE_TOAST,toast:{...a,id:t}}),o=()=>Wo({type:Dn.DISMISS_TOAST,toastId:t});return Wo({type:Dn.ADD_TOAST,toast:{...n,id:t,open:!0,onOpenChange:a=>{a||o()}}}),{id:t,dismiss:o,update:s}}function _w(){const[n,t]=b.useState(Oa);return b.useEffect(()=>(Pa.push(t),()=>{const s=Pa.indexOf(t);s>-1&&Pa.splice(s,1)}),[n]),{...n,toast:bw,dismiss:s=>Wo({type:Dn.DISMISS_TOAST,toastId:s})}}var Qc=ng();const kw=Hc(Qc);function Dt(n,t,{checkForDefaultPrevented:s=!0}={}){return function(a){if(n==null||n(a),s===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function bh(n,t){if(typeof n=="function")return n(t);n!=null&&(n.current=t)}function Kc(...n){return t=>{let s=!1;const o=n.map(a=>{const u=bh(a,t);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let a=0;a{var S;const{scope:k,children:j,...M}=w,_=((S=k==null?void 0:k[n])==null?void 0:S[h])||p,x=b.useMemo(()=>M,Object.values(M));return g.jsx(_.Provider,{value:x,children:j})};m.displayName=u+"Provider";function v(w,k){var _;const j=((_=k==null?void 0:k[n])==null?void 0:_[h])||p,M=b.useContext(j);if(M)return M;if(d!==void 0)return d;throw new Error(`\`${w}\` must be used within \`${u}\``)}return[m,v]}const a=()=>{const u=s.map(d=>b.createContext(d));return function(p){const h=(p==null?void 0:p[n])||u;return b.useMemo(()=>({[`__scope${n}`]:{...p,[n]:h}}),[p,h])}};return a.scopeName=n,[o,Cw(a,...t)]}function Cw(...n){const t=n[0];if(n.length===1)return t;const s=()=>{const o=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(u){const d=o.reduce((p,{useScope:h,scopeName:m})=>{const w=h(u)[`__scope${m}`];return{...p,...w}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:d}),[d])}};return s.scopeName=t.scopeName,s}function _h(n){const t=Rw(n),s=b.forwardRef((o,a)=>{const{children:u,...d}=o,p=b.Children.toArray(u),h=p.find(Nw);if(h){const m=h.props.children,v=p.map(w=>w===h?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:w);return g.jsx(t,{...d,ref:a,children:b.isValidElement(m)?b.cloneElement(m,void 0,v):null})}return g.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Rw(n){const t=b.forwardRef((s,o)=>{const{children:a,...u}=s;if(b.isValidElement(a)){const d=Ow(a),p=Pw(u,a.props);return a.type!==b.Fragment&&(p.ref=o?Kc(o,d):d),b.cloneElement(a,p)}return b.Children.count(a)>1?b.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var Tw=Symbol("radix.slottable");function Nw(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Tw}function Pw(n,t){const s={...t};for(const o in t){const a=n[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...p)=>{const h=u(...p);return a(...p),h}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Ow(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}function Aw(n){const t=n+"CollectionProvider",[s,o]=rg(t),[a,u]=s(t,{collectionRef:{current:null},itemMap:new Map}),d=_=>{const{scope:x,children:S}=_,L=Qt.useRef(null),N=Qt.useRef(new Map).current;return g.jsx(a,{scope:x,itemMap:N,collectionRef:L,children:S})};d.displayName=t;const p=n+"CollectionSlot",h=_h(p),m=Qt.forwardRef((_,x)=>{const{scope:S,children:L}=_,N=u(p,S),A=Gr(x,N.collectionRef);return g.jsx(h,{ref:A,children:L})});m.displayName=p;const v=n+"CollectionItemSlot",w="data-radix-collection-item",k=_h(v),j=Qt.forwardRef((_,x)=>{const{scope:S,children:L,...N}=_,A=Qt.useRef(null),V=Gr(x,A),$=u(v,S);return Qt.useEffect(()=>($.itemMap.set(A,{ref:A,...N}),()=>void $.itemMap.delete(A))),g.jsx(k,{[w]:"",ref:V,children:L})});j.displayName=v;function M(_){const x=u(n+"CollectionConsumer",_);return Qt.useCallback(()=>{const L=x.collectionRef.current;if(!L)return[];const N=Array.from(L.querySelectorAll(`[${w}]`));return Array.from(x.itemMap.values()).sort(($,G)=>N.indexOf($.ref.current)-N.indexOf(G.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:d,Slot:m,ItemSlot:j},M,o]}function jw(n){const t=Lw(n),s=b.forwardRef((o,a)=>{const{children:u,...d}=o,p=b.Children.toArray(u),h=p.find(Dw);if(h){const m=h.props.children,v=p.map(w=>w===h?b.Children.count(m)>1?b.Children.only(null):b.isValidElement(m)?m.props.children:null:w);return g.jsx(t,{...d,ref:a,children:b.isValidElement(m)?b.cloneElement(m,void 0,v):null})}return g.jsx(t,{...d,ref:a,children:u})});return s.displayName=`${n}.Slot`,s}function Lw(n){const t=b.forwardRef((s,o)=>{const{children:a,...u}=s;if(b.isValidElement(a)){const d=Mw(a),p=Fw(u,a.props);return a.type!==b.Fragment&&(p.ref=o?Kc(o,d):d),b.cloneElement(a,p)}return b.Children.count(a)>1?b.Children.only(null):null});return t.displayName=`${n}.SlotClone`,t}var Iw=Symbol("radix.slottable");function Dw(n){return b.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===Iw}function Fw(n,t){const s={...t};for(const o in t){const a=n[o],u=t[o];/^on[A-Z]/.test(o)?a&&u?s[o]=(...p)=>{const h=u(...p);return a(...p),h}:a&&(s[o]=a):o==="style"?s[o]={...a,...u}:o==="className"&&(s[o]=[a,u].filter(Boolean).join(" "))}return{...n,...s}}function Mw(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Uw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sn=Uw.reduce((n,t)=>{const s=jw(`Primitive.${t}`),o=b.forwardRef((a,u)=>{const{asChild:d,...p}=a,h=d?s:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(h,{...p,ref:u})});return o.displayName=`Primitive.${t}`,{...n,[t]:o}},{});function sg(n,t){n&&Qc.flushSync(()=>n.dispatchEvent(t))}function Yr(n){const t=b.useRef(n);return b.useEffect(()=>{t.current=n}),b.useMemo(()=>(...s)=>{var o;return(o=t.current)==null?void 0:o.call(t,...s)},[])}function Bw(n,t=globalThis==null?void 0:globalThis.document){const s=Yr(n);b.useEffect(()=>{const o=a=>{a.key==="Escape"&&s(a)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[s,t])}var zw="DismissableLayer",dc="dismissableLayer.update",$w="dismissableLayer.pointerDownOutside",Vw="dismissableLayer.focusOutside",kh,og=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ig=b.forwardRef((n,t)=>{const{disableOutsidePointerEvents:s=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:u,onInteractOutside:d,onDismiss:p,...h}=n,m=b.useContext(og),[v,w]=b.useState(null),k=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,j]=b.useState({}),M=Gr(t,G=>w(G)),_=Array.from(m.layers),[x]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),S=_.indexOf(x),L=v?_.indexOf(v):-1,N=m.layersWithOutsidePointerEventsDisabled.size>0,A=L>=S,V=Hw(G=>{const z=G.target,ie=[...m.branches].some(ue=>ue.contains(z));!A||ie||(a==null||a(G),d==null||d(G),G.defaultPrevented||p==null||p())},k),$=qw(G=>{const z=G.target;[...m.branches].some(ue=>ue.contains(z))||(u==null||u(G),d==null||d(G),G.defaultPrevented||p==null||p())},k);return Bw(G=>{L===m.layers.size-1&&(o==null||o(G),!G.defaultPrevented&&p&&(G.preventDefault(),p()))},k),b.useEffect(()=>{if(v)return s&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(kh=k.body.style.pointerEvents,k.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(v)),m.layers.add(v),Ch(),()=>{s&&m.layersWithOutsidePointerEventsDisabled.size===1&&(k.body.style.pointerEvents=kh)}},[v,k,s,m]),b.useEffect(()=>()=>{v&&(m.layers.delete(v),m.layersWithOutsidePointerEventsDisabled.delete(v),Ch())},[v,m]),b.useEffect(()=>{const G=()=>j({});return document.addEventListener(dc,G),()=>document.removeEventListener(dc,G)},[]),g.jsx(Sn.div,{...h,ref:M,style:{pointerEvents:N?A?"auto":"none":void 0,...n.style},onFocusCapture:Dt(n.onFocusCapture,$.onFocusCapture),onBlurCapture:Dt(n.onBlurCapture,$.onBlurCapture),onPointerDownCapture:Dt(n.onPointerDownCapture,V.onPointerDownCapture)})});ig.displayName=zw;var Ww="DismissableLayerBranch",ag=b.forwardRef((n,t)=>{const s=b.useContext(og),o=b.useRef(null),a=Gr(t,o);return b.useEffect(()=>{const u=o.current;if(u)return s.branches.add(u),()=>{s.branches.delete(u)}},[s.branches]),g.jsx(Sn.div,{...n,ref:a})});ag.displayName=Ww;function Hw(n,t=globalThis==null?void 0:globalThis.document){const s=Yr(n),o=b.useRef(!1),a=b.useRef(()=>{});return b.useEffect(()=>{const u=p=>{if(p.target&&!o.current){let h=function(){lg($w,s,m,{discrete:!0})};const m={originalEvent:p};p.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=h,t.addEventListener("click",a.current,{once:!0})):h()}else t.removeEventListener("click",a.current);o.current=!1},d=window.setTimeout(()=>{t.addEventListener("pointerdown",u)},0);return()=>{window.clearTimeout(d),t.removeEventListener("pointerdown",u),t.removeEventListener("click",a.current)}},[t,s]),{onPointerDownCapture:()=>o.current=!0}}function qw(n,t=globalThis==null?void 0:globalThis.document){const s=Yr(n),o=b.useRef(!1);return b.useEffect(()=>{const a=u=>{u.target&&!o.current&&lg(Vw,s,{originalEvent:u},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,s]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ch(){const n=new CustomEvent(dc);document.dispatchEvent(n)}function lg(n,t,s,{discrete:o}){const a=s.originalEvent.target,u=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),o?sg(a,u):a.dispatchEvent(u)}var Qw=ig,Kw=ag,qo=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},Gw="Portal",ug=b.forwardRef((n,t)=>{var p;const{container:s,...o}=n,[a,u]=b.useState(!1);qo(()=>u(!0),[]);const d=s||a&&((p=globalThis==null?void 0:globalThis.document)==null?void 0:p.body);return d?kw.createPortal(g.jsx(Sn.div,{...o,ref:t}),d):null});ug.displayName=Gw;function Yw(n,t){return b.useReducer((s,o)=>t[s][o]??s,n)}var cg=n=>{const{present:t,children:s}=n,o=Xw(t),a=typeof s=="function"?s({present:o.isPresent}):b.Children.only(s),u=Gr(o.ref,Jw(a));return typeof s=="function"||o.isPresent?b.cloneElement(a,{ref:u}):null};cg.displayName="Presence";function Xw(n){const[t,s]=b.useState(),o=b.useRef(null),a=b.useRef(n),u=b.useRef("none"),d=n?"mounted":"unmounted",[p,h]=Yw(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const m=Ea(o.current);u.current=p==="mounted"?m:"none"},[p]),qo(()=>{const m=o.current,v=a.current;if(v!==n){const k=u.current,j=Ea(m);n?h("MOUNT"):j==="none"||(m==null?void 0:m.display)==="none"?h("UNMOUNT"):h(v&&k!==j?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,h]),qo(()=>{if(t){let m;const v=t.ownerDocument.defaultView??window,w=j=>{const _=Ea(o.current).includes(CSS.escape(j.animationName));if(j.target===t&&_&&(h("ANIMATION_END"),!a.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",m=v.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},k=j=>{j.target===t&&(u.current=Ea(o.current))};return t.addEventListener("animationstart",k),t.addEventListener("animationcancel",w),t.addEventListener("animationend",w),()=>{v.clearTimeout(m),t.removeEventListener("animationstart",k),t.removeEventListener("animationcancel",w),t.removeEventListener("animationend",w)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:b.useCallback(m=>{o.current=m?getComputedStyle(m):null,s(m)},[])}}function Ea(n){return(n==null?void 0:n.animationName)||"none"}function Jw(n){var o,a;let t=(o=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:o.get,s=t&&"isReactWarning"in t&&t.isReactWarning;return s?n.ref:(t=(a=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:a.get,s=t&&"isReactWarning"in t&&t.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var Zw=tg[" useInsertionEffect ".trim().toString()]||qo;function ex({prop:n,defaultProp:t,onChange:s=()=>{},caller:o}){const[a,u,d]=tx({defaultProp:t,onChange:s}),p=n!==void 0,h=p?n:a;{const v=b.useRef(n!==void 0);b.useEffect(()=>{const w=v.current;w!==p&&console.warn(`${o} is changing from ${w?"controlled":"uncontrolled"} to ${p?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),v.current=p},[p,o])}const m=b.useCallback(v=>{var w;if(p){const k=nx(v)?v(n):v;k!==n&&((w=d.current)==null||w.call(d,k))}else u(v)},[p,n,u,d]);return[h,m]}function tx({defaultProp:n,onChange:t}){const[s,o]=b.useState(n),a=b.useRef(s),u=b.useRef(t);return Zw(()=>{u.current=t},[t]),b.useEffect(()=>{var d;a.current!==s&&((d=u.current)==null||d.call(u,s),a.current=s)},[s,a]),[s,o,u]}function nx(n){return typeof n=="function"}var rx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),sx="VisuallyHidden",Gc=b.forwardRef((n,t)=>g.jsx(Sn.span,{...n,ref:t,style:{...rx,...n.style}}));Gc.displayName=sx;var Yc="ToastProvider",[Xc,ox,ix]=Aw("Toast"),[dg]=rg("Toast",[ix]),[ax,Ha]=dg(Yc),fg=n=>{const{__scopeToast:t,label:s="Notification",duration:o=5e3,swipeDirection:a="right",swipeThreshold:u=50,children:d}=n,[p,h]=b.useState(null),[m,v]=b.useState(0),w=b.useRef(!1),k=b.useRef(!1);return s.trim()||console.error(`Invalid prop \`label\` supplied to \`${Yc}\`. Expected non-empty \`string\`.`),g.jsx(Xc.Provider,{scope:t,children:g.jsx(ax,{scope:t,label:s,duration:o,swipeDirection:a,swipeThreshold:u,toastCount:m,viewport:p,onViewportChange:h,onToastAdd:b.useCallback(()=>v(j=>j+1),[]),onToastRemove:b.useCallback(()=>v(j=>j-1),[]),isFocusedToastEscapeKeyDownRef:w,isClosePausedRef:k,children:d})})};fg.displayName=Yc;var pg="ToastViewport",lx=["F8"],fc="toast.viewportPause",pc="toast.viewportResume",hg=b.forwardRef((n,t)=>{const{__scopeToast:s,hotkey:o=lx,label:a="Notifications ({hotkey})",...u}=n,d=Ha(pg,s),p=ox(s),h=b.useRef(null),m=b.useRef(null),v=b.useRef(null),w=b.useRef(null),k=Gr(t,w,d.onViewportChange),j=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=d.toastCount>0;b.useEffect(()=>{const x=S=>{var N;o.length!==0&&o.every(A=>S[A]||S.code===A)&&((N=w.current)==null||N.focus())};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),b.useEffect(()=>{const x=h.current,S=w.current;if(M&&x&&S){const L=()=>{if(!d.isClosePausedRef.current){const $=new CustomEvent(fc);S.dispatchEvent($),d.isClosePausedRef.current=!0}},N=()=>{if(d.isClosePausedRef.current){const $=new CustomEvent(pc);S.dispatchEvent($),d.isClosePausedRef.current=!1}},A=$=>{!x.contains($.relatedTarget)&&N()},V=()=>{x.contains(document.activeElement)||N()};return x.addEventListener("focusin",L),x.addEventListener("focusout",A),x.addEventListener("pointermove",L),x.addEventListener("pointerleave",V),window.addEventListener("blur",L),window.addEventListener("focus",N),()=>{x.removeEventListener("focusin",L),x.removeEventListener("focusout",A),x.removeEventListener("pointermove",L),x.removeEventListener("pointerleave",V),window.removeEventListener("blur",L),window.removeEventListener("focus",N)}}},[M,d.isClosePausedRef]);const _=b.useCallback(({tabbingDirection:x})=>{const L=p().map(N=>{const A=N.ref.current,V=[A,...Ex(A)];return x==="forwards"?V:V.reverse()});return(x==="forwards"?L.reverse():L).flat()},[p]);return b.useEffect(()=>{const x=w.current;if(x){const S=L=>{var V,$,G;const N=L.altKey||L.ctrlKey||L.metaKey;if(L.key==="Tab"&&!N){const z=document.activeElement,ie=L.shiftKey;if(L.target===x&&ie){(V=m.current)==null||V.focus();return}const Te=_({tabbingDirection:ie?"backwards":"forwards"}),xe=Te.findIndex(J=>J===z);Ku(Te.slice(xe+1))?L.preventDefault():ie?($=m.current)==null||$.focus():(G=v.current)==null||G.focus()}};return x.addEventListener("keydown",S),()=>x.removeEventListener("keydown",S)}},[p,_]),g.jsxs(Kw,{ref:h,role:"region","aria-label":a.replace("{hotkey}",j),tabIndex:-1,style:{pointerEvents:M?void 0:"none"},children:[M&&g.jsx(hc,{ref:m,onFocusFromOutsideViewport:()=>{const x=_({tabbingDirection:"forwards"});Ku(x)}}),g.jsx(Xc.Slot,{scope:s,children:g.jsx(Sn.ol,{tabIndex:-1,...u,ref:k})}),M&&g.jsx(hc,{ref:v,onFocusFromOutsideViewport:()=>{const x=_({tabbingDirection:"backwards"});Ku(x)}})]})});hg.displayName=pg;var mg="ToastFocusProxy",hc=b.forwardRef((n,t)=>{const{__scopeToast:s,onFocusFromOutsideViewport:o,...a}=n,u=Ha(mg,s);return g.jsx(Gc,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:d=>{var m;const p=d.relatedTarget;!((m=u.viewport)!=null&&m.contains(p))&&o()}})});hc.displayName=mg;var ri="Toast",ux="toast.swipeStart",cx="toast.swipeMove",dx="toast.swipeCancel",fx="toast.swipeEnd",gg=b.forwardRef((n,t)=>{const{forceMount:s,open:o,defaultOpen:a,onOpenChange:u,...d}=n,[p,h]=ex({prop:o,defaultProp:a??!0,onChange:u,caller:ri});return g.jsx(cg,{present:s||p,children:g.jsx(mx,{open:p,...d,ref:t,onClose:()=>h(!1),onPause:Yr(n.onPause),onResume:Yr(n.onResume),onSwipeStart:Dt(n.onSwipeStart,m=>{m.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Dt(n.onSwipeMove,m=>{const{x:v,y:w}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","move"),m.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${v}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${w}px`)}),onSwipeCancel:Dt(n.onSwipeCancel,m=>{m.currentTarget.setAttribute("data-swipe","cancel"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Dt(n.onSwipeEnd,m=>{const{x:v,y:w}=m.detail.delta;m.currentTarget.setAttribute("data-swipe","end"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),m.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),m.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${v}px`),m.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${w}px`),h(!1)})})})});gg.displayName=ri;var[px,hx]=dg(ri,{onClose(){}}),mx=b.forwardRef((n,t)=>{const{__scopeToast:s,type:o="foreground",duration:a,open:u,onClose:d,onEscapeKeyDown:p,onPause:h,onResume:m,onSwipeStart:v,onSwipeMove:w,onSwipeCancel:k,onSwipeEnd:j,...M}=n,_=Ha(ri,s),[x,S]=b.useState(null),L=Gr(t,J=>S(J)),N=b.useRef(null),A=b.useRef(null),V=a||_.duration,$=b.useRef(0),G=b.useRef(V),z=b.useRef(0),{onToastAdd:ie,onToastRemove:ue}=_,Ee=Yr(()=>{var be;(x==null?void 0:x.contains(document.activeElement))&&((be=_.viewport)==null||be.focus()),d()}),Te=b.useCallback(J=>{!J||J===1/0||(window.clearTimeout(z.current),$.current=new Date().getTime(),z.current=window.setTimeout(Ee,J))},[Ee]);b.useEffect(()=>{const J=_.viewport;if(J){const be=()=>{Te(G.current),m==null||m()},Se=()=>{const _e=new Date().getTime()-$.current;G.current=G.current-_e,window.clearTimeout(z.current),h==null||h()};return J.addEventListener(fc,Se),J.addEventListener(pc,be),()=>{J.removeEventListener(fc,Se),J.removeEventListener(pc,be)}}},[_.viewport,V,h,m,Te]),b.useEffect(()=>{u&&!_.isClosePausedRef.current&&Te(V)},[u,V,_.isClosePausedRef,Te]),b.useEffect(()=>(ie(),()=>ue()),[ie,ue]);const xe=b.useMemo(()=>x?bg(x):null,[x]);return _.viewport?g.jsxs(g.Fragment,{children:[xe&&g.jsx(gx,{__scopeToast:s,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:xe}),g.jsx(px,{scope:s,onClose:Ee,children:Qc.createPortal(g.jsx(Xc.ItemSlot,{scope:s,children:g.jsx(Qw,{asChild:!0,onEscapeKeyDown:Dt(p,()=>{_.isFocusedToastEscapeKeyDownRef.current||Ee(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:g.jsx(Sn.li,{tabIndex:0,"data-state":u?"open":"closed","data-swipe-direction":_.swipeDirection,...M,ref:L,style:{userSelect:"none",touchAction:"none",...n.style},onKeyDown:Dt(n.onKeyDown,J=>{J.key==="Escape"&&(p==null||p(J.nativeEvent),J.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,Ee()))}),onPointerDown:Dt(n.onPointerDown,J=>{J.button===0&&(N.current={x:J.clientX,y:J.clientY})}),onPointerMove:Dt(n.onPointerMove,J=>{if(!N.current)return;const be=J.clientX-N.current.x,Se=J.clientY-N.current.y,_e=!!A.current,K=["left","right"].includes(_.swipeDirection),ae=["left","up"].includes(_.swipeDirection)?Math.min:Math.max,U=K?ae(0,be):0,P=K?0:ae(0,Se),B=J.pointerType==="touch"?10:2,ce={x:U,y:P},me={originalEvent:J,delta:ce};_e?(A.current=ce,Sa(cx,w,me,{discrete:!1})):Rh(ce,_.swipeDirection,B)?(A.current=ce,Sa(ux,v,me,{discrete:!1}),J.target.setPointerCapture(J.pointerId)):(Math.abs(be)>B||Math.abs(Se)>B)&&(N.current=null)}),onPointerUp:Dt(n.onPointerUp,J=>{const be=A.current,Se=J.target;if(Se.hasPointerCapture(J.pointerId)&&Se.releasePointerCapture(J.pointerId),A.current=null,N.current=null,be){const _e=J.currentTarget,K={originalEvent:J,delta:be};Rh(be,_.swipeDirection,_.swipeThreshold)?Sa(fx,j,K,{discrete:!0}):Sa(dx,k,K,{discrete:!0}),_e.addEventListener("click",ae=>ae.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),gx=n=>{const{__scopeToast:t,children:s,...o}=n,a=Ha(ri,t),[u,d]=b.useState(!1),[p,h]=b.useState(!1);return wx(()=>d(!0)),b.useEffect(()=>{const m=window.setTimeout(()=>h(!0),1e3);return()=>window.clearTimeout(m)},[]),p?null:g.jsx(ug,{asChild:!0,children:g.jsx(Gc,{...o,children:u&&g.jsxs(g.Fragment,{children:[a.label," ",s]})})})},yx="ToastTitle",yg=b.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n;return g.jsx(Sn.div,{...o,ref:t})});yg.displayName=yx;var vx="ToastDescription",vg=b.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n;return g.jsx(Sn.div,{...o,ref:t})});vg.displayName=vx;var wg="ToastAction",xg=b.forwardRef((n,t)=>{const{altText:s,...o}=n;return s.trim()?g.jsx(Sg,{altText:s,asChild:!0,children:g.jsx(Jc,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${wg}\`. Expected non-empty \`string\`.`),null)});xg.displayName=wg;var Eg="ToastClose",Jc=b.forwardRef((n,t)=>{const{__scopeToast:s,...o}=n,a=hx(Eg,s);return g.jsx(Sg,{asChild:!0,children:g.jsx(Sn.button,{type:"button",...o,ref:t,onClick:Dt(n.onClick,a.onClose)})})});Jc.displayName=Eg;var Sg=b.forwardRef((n,t)=>{const{__scopeToast:s,altText:o,...a}=n;return g.jsx(Sn.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...a,ref:t})});function bg(n){const t=[];return Array.from(n.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),xx(o)){const a=o.ariaHidden||o.hidden||o.style.display==="none",u=o.dataset.radixToastAnnounceExclude==="";if(!a)if(u){const d=o.dataset.radixToastAnnounceAlt;d&&t.push(d)}else t.push(...bg(o))}}),t}function Sa(n,t,s,{discrete:o}){const a=s.originalEvent.currentTarget,u=new CustomEvent(n,{bubbles:!0,cancelable:!0,detail:s});t&&a.addEventListener(n,t,{once:!0}),o?sg(a,u):a.dispatchEvent(u)}var Rh=(n,t,s=0)=>{const o=Math.abs(n.x),a=Math.abs(n.y),u=o>a;return t==="left"||t==="right"?u&&o>s:!u&&a>s};function wx(n=()=>{}){const t=Yr(n);qo(()=>{let s=0,o=0;return s=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(s),window.cancelAnimationFrame(o)}},[t])}function xx(n){return n.nodeType===n.ELEMENT_NODE}function Ex(n){const t=[],s=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const a=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||a?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;s.nextNode();)t.push(s.currentNode);return t}function Ku(n){const t=document.activeElement;return n.some(s=>s===t?!0:(s.focus(),document.activeElement!==t))}var Sx=fg,_g=hg,kg=gg,Cg=yg,Rg=vg,Tg=xg,Ng=Jc;function Pg(n){var t,s,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var a=n.length;for(t=0;ttypeof n=="boolean"?`${n}`:n===0?"0":n,Nh=Og,bx=(n,t)=>s=>{var o;if((t==null?void 0:t.variants)==null)return Nh(n,s==null?void 0:s.class,s==null?void 0:s.className);const{variants:a,defaultVariants:u}=t,d=Object.keys(a).map(m=>{const v=s==null?void 0:s[m],w=u==null?void 0:u[m];if(v===null)return null;const k=Th(v)||Th(w);return a[m][k]}),p=s&&Object.entries(s).reduce((m,v)=>{let[w,k]=v;return k===void 0||(m[w]=k),m},{}),h=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((m,v)=>{let{class:w,className:k,...j}=v;return Object.entries(j).every(M=>{let[_,x]=M;return Array.isArray(x)?x.includes({...u,...p}[_]):{...u,...p}[_]===x})?[...m,w,k]:m},[]);return Nh(n,d,h,s==null?void 0:s.class,s==null?void 0:s.className)};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _x=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ag=(...n)=>n.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var kx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Cx=b.forwardRef(({color:n="currentColor",size:t=24,strokeWidth:s=2,absoluteStrokeWidth:o,className:a="",children:u,iconNode:d,...p},h)=>b.createElement("svg",{ref:h,...kx,width:t,height:t,stroke:n,strokeWidth:o?Number(s)*24/Number(t):s,className:Ag("lucide",a),...p},[...d.map(([m,v])=>b.createElement(m,v)),...Array.isArray(u)?u:[u]]));/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rx=(n,t)=>{const s=b.forwardRef(({className:o,...a},u)=>b.createElement(Cx,{ref:u,iconNode:t,className:Ag(`lucide-${_x(n)}`,o),...a}));return s.displayName=`${n}`,s};/** * @license lucide-react v0.475.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tx=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Nx=Rx("X",Tx),Px=(n,t)=>{const s=new Array(n.length+t.length);for(let o=0;o({classGroupId:n,validator:t}),jg=(n=new Map,t=null,s)=>({nextPart:n,validators:t,classGroupId:s}),Ua="-",Ph=[],Ax="arbitrary..",jx=n=>{const t=Ix(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return Lx(d);const p=d.split(Ua),h=p[0]===""&&p.length>1?1:0;return Lg(p,h,t)},getConflictingClassGroupIds:(d,p)=>{if(p){const h=o[d],m=s[d];return h?m?Px(m,h):h:m||Ph}return s[d]||Ph}}},Lg=(n,t,s)=>{if(n.length-t===0)return s.classGroupId;const a=n[t],u=s.nextPart.get(a);if(u){const m=Lg(n,t+1,u);if(m)return m}const d=s.validators;if(d===null)return;const p=t===0?n.join(Ua):n.slice(t).join(Ua),h=d.length;for(let m=0;mn.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=n.slice(1,-1),s=t.indexOf(":"),o=t.slice(0,s);return o?Ax+o:void 0})(),Ix=n=>{const{theme:t,classGroups:s}=n;return Dx(s,t)},Dx=(n,t)=>{const s=jg();for(const o in n){const a=n[o];Zc(a,s,o,t)}return s},Zc=(n,t,s,o)=>{const a=n.length;for(let u=0;u{if(typeof n=="string"){Mx(n,t,s);return}if(typeof n=="function"){Ux(n,t,s,o);return}Bx(n,t,s,o)},Mx=(n,t,s)=>{const o=n===""?t:Ig(t,n);o.classGroupId=s},Ux=(n,t,s,o)=>{if(zx(n)){Zc(n(o),t,s,o);return}t.validators===null&&(t.validators=[]),t.validators.push(Ox(s,n))},Bx=(n,t,s,o)=>{const a=Object.entries(n),u=a.length;for(let d=0;d{let s=n;const o=t.split(Ua),a=o.length;for(let u=0;u"isThemeGetter"in n&&n.isThemeGetter===!0,$x=n=>{if(n<1)return{get:()=>{},set:()=>{}};let t=0,s=Object.create(null),o=Object.create(null);const a=(u,d)=>{s[u]=d,t++,t>n&&(t=0,o=s,s=Object.create(null))};return{get(u){let d=s[u];if(d!==void 0)return d;if((d=o[u])!==void 0)return a(u,d),d},set(u,d){u in s?s[u]=d:a(u,d)}}},mc="!",Oh=":",Vx=[],Ah=(n,t,s,o,a)=>({modifiers:n,hasImportantModifier:t,baseClassName:s,maybePostfixModifierPosition:o,isExternal:a}),Wx=n=>{const{prefix:t,experimentalParseClassName:s}=n;let o=a=>{const u=[];let d=0,p=0,h=0,m;const v=a.length;for(let _=0;_h?m-h:void 0;return Ah(u,j,k,M)};if(t){const a=t+Oh,u=o;o=d=>d.startsWith(a)?u(d.slice(a.length)):Ah(Vx,!1,d,void 0,!0)}if(s){const a=o;o=u=>s({className:u,parseClassName:a})}return o},Hx=n=>{const t=new Map;return n.orderSensitiveModifiers.forEach((s,o)=>{t.set(s,1e6+o)}),s=>{const o=[];let a=[];for(let u=0;u0&&(a.sort(),o.push(...a),a=[]),o.push(d)):a.push(d)}return a.length>0&&(a.sort(),o.push(...a)),o}},qx=n=>({cache:$x(n.cacheSize),parseClassName:Wx(n),sortModifiers:Hx(n),...jx(n)}),Qx=/\s+/,Kx=(n,t)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:a,sortModifiers:u}=t,d=[],p=n.trim().split(Qx);let h="";for(let m=p.length-1;m>=0;m-=1){const v=p[m],{isExternal:w,modifiers:k,hasImportantModifier:j,baseClassName:M,maybePostfixModifierPosition:_}=s(v);if(w){h=v+(h.length>0?" "+h:h);continue}let x=!!_,S=o(x?M.substring(0,_):M);if(!S){if(!x){h=v+(h.length>0?" "+h:h);continue}if(S=o(M),!S){h=v+(h.length>0?" "+h:h);continue}x=!1}const L=k.length===0?"":k.length===1?k[0]:u(k).join(":"),N=j?L+mc:L,A=N+S;if(d.indexOf(A)>-1)continue;d.push(A);const V=a(S,x);for(let $=0;$0?" "+h:h)}return h},Gx=(...n)=>{let t=0,s,o,a="";for(;t{if(typeof n=="string")return n;let t,s="";for(let o=0;o{let s,o,a,u;const d=h=>{const m=t.reduce((v,w)=>w(v),n());return s=qx(m),o=s.cache.get,a=s.cache.set,u=p,p(h)},p=h=>{const m=o(h);if(m)return m;const v=Kx(h,s);return a(h,v),v};return u=d,(...h)=>u(Gx(...h))},Xx=[],et=n=>{const t=s=>s[n]||Xx;return t.isThemeGetter=!0,t},Fg=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mg=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jx=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Zx=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,e1=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,t1=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,n1=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,r1=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sr=n=>Jx.test(n),ke=n=>!!n&&!Number.isNaN(Number(n)),or=n=>!!n&&Number.isInteger(Number(n)),Gu=n=>n.endsWith("%")&&ke(n.slice(0,-1)),An=n=>Zx.test(n),Ug=()=>!0,s1=n=>e1.test(n)&&!t1.test(n),ed=()=>!1,o1=n=>n1.test(n),i1=n=>r1.test(n),a1=n=>!re(n)&&!se(n),l1=n=>wr(n,$g,ed),re=n=>Fg.test(n),jr=n=>wr(n,Vg,s1),jh=n=>wr(n,g1,ke),u1=n=>wr(n,Hg,Ug),c1=n=>wr(n,Wg,ed),Lh=n=>wr(n,Bg,ed),d1=n=>wr(n,zg,i1),ba=n=>wr(n,qg,o1),se=n=>Mg.test(n),Io=n=>es(n,Vg),f1=n=>es(n,Wg),Ih=n=>es(n,Bg),p1=n=>es(n,$g),h1=n=>es(n,zg),_a=n=>es(n,qg,!0),m1=n=>es(n,Hg,!0),wr=(n,t,s)=>{const o=Fg.exec(n);return o?o[1]?t(o[1]):s(o[2]):!1},es=(n,t,s=!1)=>{const o=Mg.exec(n);return o?o[1]?t(o[1]):s:!1},Bg=n=>n==="position"||n==="percentage",zg=n=>n==="image"||n==="url",$g=n=>n==="length"||n==="size"||n==="bg-size",Vg=n=>n==="length",g1=n=>n==="number",Wg=n=>n==="family-name",Hg=n=>n==="number"||n==="weight",qg=n=>n==="shadow",y1=()=>{const n=et("color"),t=et("font"),s=et("text"),o=et("font-weight"),a=et("tracking"),u=et("leading"),d=et("breakpoint"),p=et("container"),h=et("spacing"),m=et("radius"),v=et("shadow"),w=et("inset-shadow"),k=et("text-shadow"),j=et("drop-shadow"),M=et("blur"),_=et("perspective"),x=et("aspect"),S=et("ease"),L=et("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...A(),se,re],$=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],z=()=>[se,re,h],ie=()=>[sr,"full","auto",...z()],ue=()=>[or,"none","subgrid",se,re],Ee=()=>["auto",{span:["full",or,se,re]},or,se,re],Te=()=>[or,"auto",se,re],xe=()=>["auto","min","max","fr",se,re],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],be=()=>["start","end","center","stretch","center-safe","end-safe"],Se=()=>["auto",...z()],_e=()=>[sr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],K=()=>[sr,"screen","full","dvw","lvw","svw","min","max","fit",...z()],ae=()=>[sr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],U=()=>[n,se,re],P=()=>[...A(),Ih,Lh,{position:[se,re]}],B=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ce=()=>["auto","cover","contain",p1,l1,{size:[se,re]}],me=()=>[Gu,Io,jr],pe=()=>["","none","full",m,se,re],Y=()=>["",ke,Io,jr],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ye=()=>[ke,Gu,Ih,Lh],tt=()=>["","none",M,se,re],Ft=()=>["none",ke,se,re],it=()=>["none",ke,se,re],Xt=()=>[ke,se,re],Mt=()=>[sr,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[An],breakpoint:[An],color:[Ug],container:[An],"drop-shadow":[An],ease:["in","out","in-out"],font:[a1],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[An],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[An],shadow:[An],spacing:["px",ke],text:[An],"text-shadow":[An],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sr,re,se,x]}],container:["container"],columns:[{columns:[ke,re,se,p]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[or,"auto",se,re]}],basis:[{basis:[sr,"full","auto",p,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ke,sr,"auto","initial","none",re]}],grow:[{grow:["",ke,se,re]}],shrink:[{shrink:["",ke,se,re]}],order:[{order:[or,"first","last","none",se,re]}],"grid-cols":[{"grid-cols":ue()}],"col-start-end":[{col:Ee()}],"col-start":[{"col-start":Te()}],"col-end":[{"col-end":Te()}],"grid-rows":[{"grid-rows":ue()}],"row-start-end":[{row:Ee()}],"row-start":[{"row-start":Te()}],"row-end":[{"row-end":Te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":xe()}],"auto-rows":[{"auto-rows":xe()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...be(),"normal"]}],"justify-self":[{"justify-self":["auto",...be()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...be(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...be(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...be(),"baseline"]}],"place-self":[{"place-self":["auto",...be()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:Se()}],mx:[{mx:Se()}],my:[{my:Se()}],ms:[{ms:Se()}],me:[{me:Se()}],mbs:[{mbs:Se()}],mbe:[{mbe:Se()}],mt:[{mt:Se()}],mr:[{mr:Se()}],mb:[{mb:Se()}],ml:[{ml:Se()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:_e()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[p,"screen",..._e()]}],"min-w":[{"min-w":[p,"screen","none",..._e()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[d]},..._e()]}],h:[{h:["screen","lh",..._e()]}],"min-h":[{"min-h":["screen","lh","none",..._e()]}],"max-h":[{"max-h":["screen","lh",..._e()]}],"font-size":[{text:["base",s,Io,jr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,m1,u1]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Gu,re]}],"font-family":[{font:[f1,c1,t]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,se,re]}],"line-clamp":[{"line-clamp":[ke,"none",se,jh]}],leading:[{leading:[u,...z()]}],"list-image":[{"list-image":["none",se,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[ke,"from-font","auto",se,jr]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[ke,"auto",se,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",se,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:B()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},or,se,re],radial:["",se,re],conic:[or,se,re]},h1,d1]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-bs":[{"border-bs":Y()}],"border-w-be":[{"border-be":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-bs":[{"border-bs":U()}],"border-color-be":[{"border-be":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ke,se,re]}],"outline-w":[{outline:["",ke,Io,jr]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",v,_a,ba]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",w,_a,ba]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[ke,jr]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",k,_a,ba]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[ke,se,re]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":ye()}],"mask-image-linear-to-pos":[{"mask-linear-to":ye()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ye()}],"mask-image-t-to-pos":[{"mask-t-to":ye()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ye()}],"mask-image-r-to-pos":[{"mask-r-to":ye()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ye()}],"mask-image-b-to-pos":[{"mask-b-to":ye()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ye()}],"mask-image-l-to-pos":[{"mask-l-to":ye()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ye()}],"mask-image-x-to-pos":[{"mask-x-to":ye()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ye()}],"mask-image-y-to-pos":[{"mask-y-to":ye()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[se,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ye()}],"mask-image-radial-to-pos":[{"mask-radial-to":ye()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":ye()}],"mask-image-conic-to-pos":[{"mask-conic-to":ye()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:B()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,re]}],filter:[{filter:["","none",se,re]}],blur:[{blur:tt()}],brightness:[{brightness:[ke,se,re]}],contrast:[{contrast:[ke,se,re]}],"drop-shadow":[{"drop-shadow":["","none",j,_a,ba]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",ke,se,re]}],"hue-rotate":[{"hue-rotate":[ke,se,re]}],invert:[{invert:["",ke,se,re]}],saturate:[{saturate:[ke,se,re]}],sepia:[{sepia:["",ke,se,re]}],"backdrop-filter":[{"backdrop-filter":["","none",se,re]}],"backdrop-blur":[{"backdrop-blur":tt()}],"backdrop-brightness":[{"backdrop-brightness":[ke,se,re]}],"backdrop-contrast":[{"backdrop-contrast":[ke,se,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ke,se,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ke,se,re]}],"backdrop-invert":[{"backdrop-invert":["",ke,se,re]}],"backdrop-opacity":[{"backdrop-opacity":[ke,se,re]}],"backdrop-saturate":[{"backdrop-saturate":[ke,se,re]}],"backdrop-sepia":[{"backdrop-sepia":["",ke,se,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ke,"initial",se,re]}],ease:[{ease:["linear","initial",S,se,re]}],delay:[{delay:[ke,se,re]}],animate:[{animate:["none",L,se,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,se,re]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:Ft()}],"rotate-x":[{"rotate-x":Ft()}],"rotate-y":[{"rotate-y":Ft()}],"rotate-z":[{"rotate-z":Ft()}],scale:[{scale:it()}],"scale-x":[{"scale-x":it()}],"scale-y":[{"scale-y":it()}],"scale-z":[{"scale-z":it()}],"scale-3d":["scale-3d"],skew:[{skew:Xt()}],"skew-x":[{"skew-x":Xt()}],"skew-y":[{"skew-y":Xt()}],transform:[{transform:[se,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Mt()}],"translate-x":[{"translate-x":Mt()}],"translate-y":[{"translate-y":Mt()}],"translate-z":[{"translate-z":Mt()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",se,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",se,re]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[ke,Io,jr,jh]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},v1=Yx(y1);function Ws(...n){return v1(Og(n))}const w1=Sx,Qg=b.forwardRef(({className:n,...t},s)=>g.jsx(_g,{ref:s,className:Ws("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",n),...t}));Qg.displayName=_g.displayName;const x1=bx("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Kg=b.forwardRef(({className:n,variant:t,...s},o)=>g.jsx(kg,{ref:o,className:Ws(x1({variant:t}),n),...s}));Kg.displayName=kg.displayName;const E1=b.forwardRef(({className:n,...t},s)=>g.jsx(Tg,{ref:s,className:Ws("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",n),...t}));E1.displayName=Tg.displayName;const Gg=b.forwardRef(({className:n,...t},s)=>g.jsx(Ng,{ref:s,className:Ws("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",n),"toast-close":"",...t,children:g.jsx(Nx,{className:"h-4 w-4"})}));Gg.displayName=Ng.displayName;const Yg=b.forwardRef(({className:n,...t},s)=>g.jsx(Cg,{ref:s,className:Ws("text-sm font-semibold",n),...t}));Yg.displayName=Cg.displayName;const Xg=b.forwardRef(({className:n,...t},s)=>g.jsx(Rg,{ref:s,className:Ws("text-sm opacity-90",n),...t}));Xg.displayName=Rg.displayName;function S1(){const{toasts:n}=_w();return g.jsxs(w1,{children:[n.map(function({id:t,title:s,description:o,action:a,...u}){return g.jsxs(Kg,{...u,children:[g.jsxs("div",{className:"grid gap-1",children:[s&&g.jsx(Yg,{children:s}),o&&g.jsx(Xg,{children:o})]}),a,g.jsx(Gg,{})]},t)}),g.jsx(Qg,{})]})}var si=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},b1={setTimeout:(n,t)=>setTimeout(n,t),clearTimeout:n=>clearTimeout(n),setInterval:(n,t)=>setInterval(n,t),clearInterval:n=>clearInterval(n)},ar,Wc,Wm,_1=(Wm=class{constructor(){he(this,ar,b1);he(this,Wc,!1)}setTimeoutProvider(n){ee(this,ar,n)}setTimeout(n,t){return R(this,ar).setTimeout(n,t)}clearTimeout(n){R(this,ar).clearTimeout(n)}setInterval(n,t){return R(this,ar).setInterval(n,t)}clearInterval(n){R(this,ar).clearInterval(n)}},ar=new WeakMap,Wc=new WeakMap,Wm),Dr=new _1;function k1(n){setTimeout(n,0)}var Xr=typeof window>"u"||"Deno"in globalThis;function Pt(){}function C1(n,t){return typeof n=="function"?n(t):n}function gc(n){return typeof n=="number"&&n>=0&&n!==1/0}function Jg(n,t){return Math.max(n+(t||0)-Date.now(),0)}function gr(n,t){return typeof n=="function"?n(t):n}function Kt(n,t){return typeof n=="function"?n(t):n}function Dh(n,t){const{type:s="all",exact:o,fetchStatus:a,predicate:u,queryKey:d,stale:p}=n;if(d){if(o){if(t.queryHash!==td(d,t.options))return!1}else if(!Ko(t.queryKey,d))return!1}if(s!=="all"){const h=t.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof p=="boolean"&&t.isStale()!==p||a&&a!==t.state.fetchStatus||u&&!u(t))}function Fh(n,t){const{exact:s,status:o,predicate:a,mutationKey:u}=n;if(u){if(!t.options.mutationKey)return!1;if(s){if(Qo(t.options.mutationKey)!==Qo(u))return!1}else if(!Ko(t.options.mutationKey,u))return!1}return!(o&&t.state.status!==o||a&&!a(t))}function td(n,t){return((t==null?void 0:t.queryKeyHashFn)||Qo)(n)}function Qo(n){return JSON.stringify(n,(t,s)=>vc(s)?Object.keys(s).sort().reduce((o,a)=>(o[a]=s[a],o),{}):s)}function Ko(n,t){return n===t?!0:typeof n!=typeof t?!1:n&&t&&typeof n=="object"&&typeof t=="object"?Object.keys(t).every(s=>Ko(n[s],t[s])):!1}var R1=Object.prototype.hasOwnProperty;function Zg(n,t,s=0){if(n===t)return n;if(s>500)return t;const o=Mh(n)&&Mh(t);if(!o&&!(vc(n)&&vc(t)))return t;const u=(o?n:Object.keys(n)).length,d=o?t:Object.keys(t),p=d.length,h=o?new Array(p):{};let m=0;for(let v=0;v{Dr.setTimeout(t,n)})}function wc(n,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,t):s.structuralSharing!==!1?Zg(n,t):t}function N1(n,t,s=0){const o=[...n,t];return s&&o.length>s?o.slice(1):o}function P1(n,t,s=0){const o=[t,...n];return s&&o.length>s?o.slice(0,-1):o}var nd=Symbol();function ey(n,t){return!n.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!n.queryFn||n.queryFn===nd?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function ty(n,t){return typeof n=="function"?n(...t):!!n}function O1(n,t,s){let o=!1,a;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(a??(a=t()),o||(o=!0,a.aborted?s():a.addEventListener("abort",s,{once:!0})),a)}),n}var Mr,lr,Ps,Hm,A1=(Hm=class extends si{constructor(){super();he(this,Mr);he(this,lr);he(this,Ps);ee(this,Ps,t=>{if(!Xr&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){R(this,lr)||this.setEventListener(R(this,Ps))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,lr))==null||t.call(this),ee(this,lr,void 0))}setEventListener(t){var s;ee(this,Ps,t),(s=R(this,lr))==null||s.call(this),ee(this,lr,t(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(t){R(this,Mr)!==t&&(ee(this,Mr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof R(this,Mr)=="boolean"?R(this,Mr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Mr=new WeakMap,lr=new WeakMap,Ps=new WeakMap,Hm),rd=new A1;function xc(){let n,t;const s=new Promise((a,u)=>{n=a,t=u});s.status="pending",s.catch(()=>{});function o(a){Object.assign(s,a),delete s.resolve,delete s.reject}return s.resolve=a=>{o({status:"fulfilled",value:a}),n(a)},s.reject=a=>{o({status:"rejected",reason:a}),t(a)},s}var j1=k1;function L1(){let n=[],t=0,s=p=>{p()},o=p=>{p()},a=j1;const u=p=>{t?n.push(p):a(()=>{s(p)})},d=()=>{const p=n;n=[],p.length&&a(()=>{o(()=>{p.forEach(h=>{s(h)})})})};return{batch:p=>{let h;t++;try{h=p()}finally{t--,t||d()}return h},batchCalls:p=>(...h)=>{u(()=>{p(...h)})},schedule:u,setNotifyFunction:p=>{s=p},setBatchNotifyFunction:p=>{o=p},setScheduler:p=>{a=p}}}var dt=L1(),Os,ur,As,qm,I1=(qm=class extends si{constructor(){super();he(this,Os,!0);he(this,ur);he(this,As);ee(this,As,t=>{if(!Xr&&window.addEventListener){const s=()=>t(!0),o=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){R(this,ur)||this.setEventListener(R(this,As))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,ur))==null||t.call(this),ee(this,ur,void 0))}setEventListener(t){var s;ee(this,As,t),(s=R(this,ur))==null||s.call(this),ee(this,ur,t(this.setOnline.bind(this)))}setOnline(t){R(this,Os)!==t&&(ee(this,Os,t),this.listeners.forEach(o=>{o(t)}))}isOnline(){return R(this,Os)}},Os=new WeakMap,ur=new WeakMap,As=new WeakMap,qm),Ba=new I1;function D1(n){return Math.min(1e3*2**n,3e4)}function ny(n){return(n??"online")==="online"?Ba.isOnline():!0}var Ec=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function ry(n){let t=!1,s=0,o;const a=xc(),u=()=>a.status!=="pending",d=_=>{var x;if(!u()){const S=new Ec(_);k(S),(x=n.onCancel)==null||x.call(n,S)}},p=()=>{t=!0},h=()=>{t=!1},m=()=>rd.isFocused()&&(n.networkMode==="always"||Ba.isOnline())&&n.canRun(),v=()=>ny(n.networkMode)&&n.canRun(),w=_=>{u()||(o==null||o(),a.resolve(_))},k=_=>{u()||(o==null||o(),a.reject(_))},j=()=>new Promise(_=>{var x;o=S=>{(u()||m())&&_(S)},(x=n.onPause)==null||x.call(n)}).then(()=>{var _;o=void 0,u()||(_=n.onContinue)==null||_.call(n)}),M=()=>{if(u())return;let _;const x=s===0?n.initialPromise:void 0;try{_=x??n.fn()}catch(S){_=Promise.reject(S)}Promise.resolve(_).then(w).catch(S=>{var $;if(u())return;const L=n.retry??(Xr?0:3),N=n.retryDelay??D1,A=typeof N=="function"?N(s,S):N,V=L===!0||typeof L=="number"&&sm()?void 0:j()).then(()=>{t?k(S):M()})})};return{promise:a,status:()=>a.status,cancel:d,continue:()=>(o==null||o(),a),cancelRetry:p,continueRetry:h,canStart:v,start:()=>(v()?M():j().then(M),a)}}var Ur,Qm,sy=(Qm=class{constructor(){he(this,Ur)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gc(this.gcTime)&&ee(this,Ur,Dr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Xr?1/0:300*1e3))}clearGcTimeout(){R(this,Ur)&&(Dr.clearTimeout(R(this,Ur)),ee(this,Ur,void 0))}},Ur=new WeakMap,Qm),Br,js,qt,zr,ot,Jo,$r,ln,jn,Km,F1=(Km=class extends sy{constructor(t){super();he(this,ln);he(this,Br);he(this,js);he(this,qt);he(this,zr);he(this,ot);he(this,Jo);he(this,$r);ee(this,$r,!1),ee(this,Jo,t.defaultOptions),this.setOptions(t.options),this.observers=[],ee(this,zr,t.client),ee(this,qt,R(this,zr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ee(this,Br,zh(this.options)),this.state=t.state??R(this,Br),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,ot))==null?void 0:t.promise}setOptions(t){if(this.options={...R(this,Jo),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=zh(this.options);s.data!==void 0&&(this.setState(Bh(s.data,s.dataUpdatedAt)),ee(this,Br,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,qt).remove(this)}setData(t,s){const o=wc(this.state.data,t,this.options);return Ne(this,ln,jn).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(t,s){Ne(this,ln,jn).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var o,a;const s=(o=R(this,ot))==null?void 0:o.promise;return(a=R(this,ot))==null||a.cancel(t),s?s.then(Pt).catch(Pt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Br))}isActive(){return this.observers.some(t=>Kt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===nd||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>gr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Jg(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(o=>o.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}onOnline(){var s;const t=this.observers.find(o=>o.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=R(this,ot))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,qt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(R(this,ot)&&(R(this,$r)?R(this,ot).cancel({revert:!0}):R(this,ot).cancelRetry()),this.scheduleGc()),R(this,qt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ne(this,ln,jn).call(this,{type:"invalidate"})}async fetch(t,s){var h,m,v,w,k,j,M,_,x,S,L,N;if(this.state.fetchStatus!=="idle"&&((h=R(this,ot))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(R(this,ot))return R(this,ot).continueRetry(),R(this,ot).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(V=>V.options.queryFn);A&&this.setOptions(A.options)}const o=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ee(this,$r,!0),o.signal)})},u=()=>{const A=ey(this.options,s),$=(()=>{const G={client:R(this,zr),queryKey:this.queryKey,meta:this.meta};return a(G),G})();return ee(this,$r,!1),this.options.persister?this.options.persister(A,$,this):A($)},p=(()=>{const A={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:R(this,zr),state:this.state,fetchFn:u};return a(A),A})();(m=this.options.behavior)==null||m.onFetch(p,this),ee(this,js,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=p.fetchOptions)==null?void 0:v.meta))&&Ne(this,ln,jn).call(this,{type:"fetch",meta:(w=p.fetchOptions)==null?void 0:w.meta}),ee(this,ot,ry({initialPromise:s==null?void 0:s.initialPromise,fn:p.fetchFn,onCancel:A=>{A instanceof Ec&&A.revert&&this.setState({...R(this,js),fetchStatus:"idle"}),o.abort()},onFail:(A,V)=>{Ne(this,ln,jn).call(this,{type:"failed",failureCount:A,error:V})},onPause:()=>{Ne(this,ln,jn).call(this,{type:"pause"})},onContinue:()=>{Ne(this,ln,jn).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const A=await R(this,ot).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(j=(k=R(this,qt).config).onSuccess)==null||j.call(k,A,this),(_=(M=R(this,qt).config).onSettled)==null||_.call(M,A,this.state.error,this),A}catch(A){if(A instanceof Ec){if(A.silent)return R(this,ot).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ne(this,ln,jn).call(this,{type:"error",error:A}),(S=(x=R(this,qt).config).onError)==null||S.call(x,A,this),(N=(L=R(this,qt).config).onSettled)==null||N.call(L,this.state.data,A,this),A}finally{this.scheduleGc()}}},Br=new WeakMap,js=new WeakMap,qt=new WeakMap,zr=new WeakMap,ot=new WeakMap,Jo=new WeakMap,$r=new WeakMap,ln=new WeakSet,jn=function(t){const s=o=>{switch(t.type){case"failed":return{...o,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...oy(o.data,this.options),fetchMeta:t.meta??null};case"success":const a={...o,...Bh(t.data,t.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,js,t.manual?a:void 0),a;case"error":const u=t.error;return{...o,error:u,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:u,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...t.state}}};this.state=s(this.state),dt.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),R(this,qt).notify({query:this,type:"updated",action:t})})},Km);function oy(n,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ny(t.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Bh(n,t){return{data:n,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zh(n){const t=typeof n.initialData=="function"?n.initialData():n.initialData,s=t!==void 0,o=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Nt,Pe,Zo,St,Vr,Ls,Ln,cr,ei,Is,Ds,Wr,Hr,dr,Fs,Ie,Uo,Sc,bc,_c,kc,Cc,Rc,Tc,iy,Gm,M1=(Gm=class extends si{constructor(t,s){super();he(this,Ie);he(this,Nt);he(this,Pe);he(this,Zo);he(this,St);he(this,Vr);he(this,Ls);he(this,Ln);he(this,cr);he(this,ei);he(this,Is);he(this,Ds);he(this,Wr);he(this,Hr);he(this,dr);he(this,Fs,new Set);this.options=s,ee(this,Nt,t),ee(this,cr,null),ee(this,Ln,xc()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Pe).addObserver(this),$h(R(this,Pe),this.options)?Ne(this,Ie,Uo).call(this):this.updateResult(),Ne(this,Ie,kc).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Nc(R(this,Pe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Nc(R(this,Pe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ne(this,Ie,Cc).call(this),Ne(this,Ie,Rc).call(this),R(this,Pe).removeObserver(this)}setOptions(t){const s=this.options,o=R(this,Pe);if(this.options=R(this,Nt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kt(this.options.enabled,R(this,Pe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ne(this,Ie,Tc).call(this),R(this,Pe).setOptions(this.options),s._defaulted&&!yc(this.options,s)&&R(this,Nt).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Pe),observer:this});const a=this.hasListeners();a&&Vh(R(this,Pe),o,this.options,s)&&Ne(this,Ie,Uo).call(this),this.updateResult(),a&&(R(this,Pe)!==o||Kt(this.options.enabled,R(this,Pe))!==Kt(s.enabled,R(this,Pe))||gr(this.options.staleTime,R(this,Pe))!==gr(s.staleTime,R(this,Pe)))&&Ne(this,Ie,Sc).call(this);const u=Ne(this,Ie,bc).call(this);a&&(R(this,Pe)!==o||Kt(this.options.enabled,R(this,Pe))!==Kt(s.enabled,R(this,Pe))||u!==R(this,dr))&&Ne(this,Ie,_c).call(this,u)}getOptimisticResult(t){const s=R(this,Nt).getQueryCache().build(R(this,Nt),t),o=this.createResult(s,t);return B1(this,o)&&(ee(this,St,o),ee(this,Ls,this.options),ee(this,Vr,R(this,Pe).state)),o}getCurrentResult(){return R(this,St)}trackResult(t,s){return new Proxy(t,{get:(o,a)=>(this.trackProp(a),s==null||s(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,Ln).status==="pending"&&R(this,Ln).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(t){R(this,Fs).add(t)}getCurrentQuery(){return R(this,Pe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=R(this,Nt).defaultQueryOptions(t),o=R(this,Nt).getQueryCache().build(R(this,Nt),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(t){return Ne(this,Ie,Uo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,St)))}createResult(t,s){var ie;const o=R(this,Pe),a=this.options,u=R(this,St),d=R(this,Vr),p=R(this,Ls),m=t!==o?t.state:R(this,Zo),{state:v}=t;let w={...v},k=!1,j;if(s._optimisticResults){const ue=this.hasListeners(),Ee=!ue&&$h(t,s),Te=ue&&Vh(t,o,s,a);(Ee||Te)&&(w={...w,...oy(v.data,t.options)}),s._optimisticResults==="isRestoring"&&(w.fetchStatus="idle")}let{error:M,errorUpdatedAt:_,status:x}=w;j=w.data;let S=!1;if(s.placeholderData!==void 0&&j===void 0&&x==="pending"){let ue;u!=null&&u.isPlaceholderData&&s.placeholderData===(p==null?void 0:p.placeholderData)?(ue=u.data,S=!0):ue=typeof s.placeholderData=="function"?s.placeholderData((ie=R(this,Ds))==null?void 0:ie.state.data,R(this,Ds)):s.placeholderData,ue!==void 0&&(x="success",j=wc(u==null?void 0:u.data,ue,s),k=!0)}if(s.select&&j!==void 0&&!S)if(u&&j===(d==null?void 0:d.data)&&s.select===R(this,ei))j=R(this,Is);else try{ee(this,ei,s.select),j=s.select(j),j=wc(u==null?void 0:u.data,j,s),ee(this,Is,j),ee(this,cr,null)}catch(ue){ee(this,cr,ue)}R(this,cr)&&(M=R(this,cr),j=R(this,Is),_=Date.now(),x="error");const L=w.fetchStatus==="fetching",N=x==="pending",A=x==="error",V=N&&L,$=j!==void 0,z={status:x,fetchStatus:w.fetchStatus,isPending:N,isSuccess:x==="success",isError:A,isInitialLoading:V,isLoading:V,data:j,dataUpdatedAt:w.dataUpdatedAt,error:M,errorUpdatedAt:_,failureCount:w.fetchFailureCount,failureReason:w.fetchFailureReason,errorUpdateCount:w.errorUpdateCount,isFetched:w.dataUpdateCount>0||w.errorUpdateCount>0,isFetchedAfterMount:w.dataUpdateCount>m.dataUpdateCount||w.errorUpdateCount>m.errorUpdateCount,isFetching:L,isRefetching:L&&!N,isLoadingError:A&&!$,isPaused:w.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:A&&$,isStale:sd(t,s),refetch:this.refetch,promise:R(this,Ln),isEnabled:Kt(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ue=z.data!==void 0,Ee=z.status==="error"&&!ue,Te=be=>{Ee?be.reject(z.error):ue&&be.resolve(z.data)},xe=()=>{const be=ee(this,Ln,z.promise=xc());Te(be)},J=R(this,Ln);switch(J.status){case"pending":t.queryHash===o.queryHash&&Te(J);break;case"fulfilled":(Ee||z.data!==J.value)&&xe();break;case"rejected":(!Ee||z.error!==J.reason)&&xe();break}}return z}updateResult(){const t=R(this,St),s=this.createResult(R(this,Pe),this.options);if(ee(this,Vr,R(this,Pe).state),ee(this,Ls,this.options),R(this,Vr).data!==void 0&&ee(this,Ds,R(this,Pe)),yc(s,t))return;ee(this,St,s);const o=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!R(this,Fs).size)return!0;const d=new Set(u??R(this,Fs));return this.options.throwOnError&&d.add("error"),Object.keys(R(this,St)).some(p=>{const h=p;return R(this,St)[h]!==t[h]&&d.has(h)})};Ne(this,Ie,iy).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ne(this,Ie,kc).call(this)}},Nt=new WeakMap,Pe=new WeakMap,Zo=new WeakMap,St=new WeakMap,Vr=new WeakMap,Ls=new WeakMap,Ln=new WeakMap,cr=new WeakMap,ei=new WeakMap,Is=new WeakMap,Ds=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,dr=new WeakMap,Fs=new WeakMap,Ie=new WeakSet,Uo=function(t){Ne(this,Ie,Tc).call(this);let s=R(this,Pe).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Pt)),s},Sc=function(){Ne(this,Ie,Cc).call(this);const t=gr(this.options.staleTime,R(this,Pe));if(Xr||R(this,St).isStale||!gc(t))return;const o=Jg(R(this,St).dataUpdatedAt,t)+1;ee(this,Wr,Dr.setTimeout(()=>{R(this,St).isStale||this.updateResult()},o))},bc=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Pe)):this.options.refetchInterval)??!1},_c=function(t){Ne(this,Ie,Rc).call(this),ee(this,dr,t),!(Xr||Kt(this.options.enabled,R(this,Pe))===!1||!gc(R(this,dr))||R(this,dr)===0)&&ee(this,Hr,Dr.setInterval(()=>{(this.options.refetchIntervalInBackground||rd.isFocused())&&Ne(this,Ie,Uo).call(this)},R(this,dr)))},kc=function(){Ne(this,Ie,Sc).call(this),Ne(this,Ie,_c).call(this,Ne(this,Ie,bc).call(this))},Cc=function(){R(this,Wr)&&(Dr.clearTimeout(R(this,Wr)),ee(this,Wr,void 0))},Rc=function(){R(this,Hr)&&(Dr.clearInterval(R(this,Hr)),ee(this,Hr,void 0))},Tc=function(){const t=R(this,Nt).getQueryCache().build(R(this,Nt),this.options);if(t===R(this,Pe))return;const s=R(this,Pe);ee(this,Pe,t),ee(this,Zo,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},iy=function(t){dt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(R(this,St))}),R(this,Nt).getQueryCache().notify({query:R(this,Pe),type:"observerResultsUpdated"})})},Gm);function U1(n,t){return Kt(t.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&t.retryOnMount===!1)}function $h(n,t){return U1(n,t)||n.state.data!==void 0&&Nc(n,t,t.refetchOnMount)}function Nc(n,t,s){if(Kt(t.enabled,n)!==!1&&gr(t.staleTime,n)!=="static"){const o=typeof s=="function"?s(n):s;return o==="always"||o!==!1&&sd(n,t)}return!1}function Vh(n,t,s,o){return(n!==t||Kt(o.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&sd(n,s)}function sd(n,t){return Kt(t.enabled,n)!==!1&&n.isStaleByTime(gr(t.staleTime,n))}function B1(n,t){return!yc(n.getCurrentResult(),t)}function Wh(n){return{onFetch:(t,s)=>{var v,w,k,j,M;const o=t.options,a=(k=(w=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:w.fetchMore)==null?void 0:k.direction,u=((j=t.state.data)==null?void 0:j.pages)||[],d=((M=t.state.data)==null?void 0:M.pageParams)||[];let p={pages:[],pageParams:[]},h=0;const m=async()=>{let _=!1;const x=N=>{O1(N,()=>t.signal,()=>_=!0)},S=ey(t.options,t.fetchOptions),L=async(N,A,V)=>{if(_)return Promise.reject();if(A==null&&N.pages.length)return Promise.resolve(N);const G=(()=>{const Ee={client:t.client,queryKey:t.queryKey,pageParam:A,direction:V?"backward":"forward",meta:t.options.meta};return x(Ee),Ee})(),z=await S(G),{maxPages:ie}=t.options,ue=V?P1:N1;return{pages:ue(N.pages,z,ie),pageParams:ue(N.pageParams,A,ie)}};if(a&&u.length){const N=a==="backward",A=N?z1:Hh,V={pages:u,pageParams:d},$=A(o,V);p=await L(V,$,N)}else{const N=n??u.length;do{const A=h===0?d[0]??o.initialPageParam:Hh(o,p);if(h>0&&A==null)break;p=await L(p,A),h++}while(h{var _,x;return(x=(_=t.options).persister)==null?void 0:x.call(_,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=m}}}function Hh(n,{pages:t,pageParams:s}){const o=t.length-1;return t.length>0?n.getNextPageParam(t[o],t,s[o],s):void 0}function z1(n,{pages:t,pageParams:s}){var o;return t.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,t[0],t,s[0],s):void 0}var ti,yn,vt,qr,vn,ir,Ym,$1=(Ym=class extends sy{constructor(t){super();he(this,vn);he(this,ti);he(this,yn);he(this,vt);he(this,qr);ee(this,ti,t.client),this.mutationId=t.mutationId,ee(this,vt,t.mutationCache),ee(this,yn,[]),this.state=t.state||V1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,yn).includes(t)||(R(this,yn).push(t),this.clearGcTimeout(),R(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ee(this,yn,R(this,yn).filter(s=>s!==t)),this.scheduleGc(),R(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,yn).length||(this.state.status==="pending"?this.scheduleGc():R(this,vt).remove(this))}continue(){var t;return((t=R(this,qr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var d,p,h,m,v,w,k,j,M,_,x,S,L,N,A,V,$,G;const s=()=>{Ne(this,vn,ir).call(this,{type:"continue"})},o={client:R(this,ti),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,qr,ry({fn:()=>this.options.mutationFn?this.options.mutationFn(t,o):Promise.reject(new Error("No mutationFn found")),onFail:(z,ie)=>{Ne(this,vn,ir).call(this,{type:"failed",failureCount:z,error:ie})},onPause:()=>{Ne(this,vn,ir).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,vt).canRun(this)}));const a=this.state.status==="pending",u=!R(this,qr).canStart();try{if(a)s();else{Ne(this,vn,ir).call(this,{type:"pending",variables:t,isPaused:u}),R(this,vt).config.onMutate&&await R(this,vt).config.onMutate(t,this,o);const ie=await((p=(d=this.options).onMutate)==null?void 0:p.call(d,t,o));ie!==this.state.context&&Ne(this,vn,ir).call(this,{type:"pending",context:ie,variables:t,isPaused:u})}const z=await R(this,qr).start();return await((m=(h=R(this,vt).config).onSuccess)==null?void 0:m.call(h,z,t,this.state.context,this,o)),await((w=(v=this.options).onSuccess)==null?void 0:w.call(v,z,t,this.state.context,o)),await((j=(k=R(this,vt).config).onSettled)==null?void 0:j.call(k,z,null,this.state.variables,this.state.context,this,o)),await((_=(M=this.options).onSettled)==null?void 0:_.call(M,z,null,t,this.state.context,o)),Ne(this,vn,ir).call(this,{type:"success",data:z}),z}catch(z){try{await((S=(x=R(this,vt).config).onError)==null?void 0:S.call(x,z,t,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((N=(L=this.options).onError)==null?void 0:N.call(L,z,t,this.state.context,o))}catch(ie){Promise.reject(ie)}try{await((V=(A=R(this,vt).config).onSettled)==null?void 0:V.call(A,void 0,z,this.state.variables,this.state.context,this,o))}catch(ie){Promise.reject(ie)}try{await((G=($=this.options).onSettled)==null?void 0:G.call($,void 0,z,t,this.state.context,o))}catch(ie){Promise.reject(ie)}throw Ne(this,vn,ir).call(this,{type:"error",error:z}),z}finally{R(this,vt).runNext(this)}}},ti=new WeakMap,yn=new WeakMap,vt=new WeakMap,qr=new WeakMap,vn=new WeakSet,ir=function(t){const s=o=>{switch(t.type){case"failed":return{...o,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...o,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:t.error,failureCount:o.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),dt.batch(()=>{R(this,yn).forEach(o=>{o.onMutationUpdate(t)}),R(this,vt).notify({mutation:this,type:"updated",action:t})})},Ym);function V1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var In,un,ni,Xm,W1=(Xm=class extends si{constructor(t={}){super();he(this,In);he(this,un);he(this,ni);this.config=t,ee(this,In,new Set),ee(this,un,new Map),ee(this,ni,0)}build(t,s,o){const a=new $1({client:t,mutationCache:this,mutationId:++wa(this,ni)._,options:t.defaultMutationOptions(s),state:o});return this.add(a),a}add(t){R(this,In).add(t);const s=ka(t);if(typeof s=="string"){const o=R(this,un).get(s);o?o.push(t):R(this,un).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,In).delete(t)){const s=ka(t);if(typeof s=="string"){const o=R(this,un).get(s);if(o)if(o.length>1){const a=o.indexOf(t);a!==-1&&o.splice(a,1)}else o[0]===t&&R(this,un).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=ka(t);if(typeof s=="string"){const o=R(this,un).get(s),a=o==null?void 0:o.find(u=>u.state.status==="pending");return!a||a===t}else return!0}runNext(t){var o;const s=ka(t);if(typeof s=="string"){const a=(o=R(this,un).get(s))==null?void 0:o.find(u=>u!==t&&u.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{R(this,In).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,In).clear(),R(this,un).clear()})}getAll(){return Array.from(R(this,In))}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Fh(s,o))}findAll(t={}){return this.getAll().filter(s=>Fh(t,s))}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return dt.batch(()=>Promise.all(t.map(s=>s.continue().catch(Pt))))}},In=new WeakMap,un=new WeakMap,ni=new WeakMap,Xm);function ka(n){var t;return(t=n.options.scope)==null?void 0:t.id}var wn,Jm,H1=(Jm=class extends si{constructor(t={}){super();he(this,wn);this.config=t,ee(this,wn,new Map)}build(t,s,o){const a=s.queryKey,u=s.queryHash??td(a,s);let d=this.get(u);return d||(d=new F1({client:t,queryKey:a,queryHash:u,options:t.defaultQueryOptions(s),state:o,defaultOptions:t.getQueryDefaults(a)}),this.add(d)),d}add(t){R(this,wn).has(t.queryHash)||(R(this,wn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=R(this,wn).get(t.queryHash);s&&(t.destroy(),s===t&&R(this,wn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,wn).get(t)}getAll(){return[...R(this,wn).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(o=>Dh(s,o))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(o=>Dh(t,o)):s}notify(t){dt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wn=new WeakMap,Jm),He,fr,pr,Ms,Us,hr,Bs,zs,Zm,q1=(Zm=class{constructor(n={}){he(this,He);he(this,fr);he(this,pr);he(this,Ms);he(this,Us);he(this,hr);he(this,Bs);he(this,zs);ee(this,He,n.queryCache||new H1),ee(this,fr,n.mutationCache||new W1),ee(this,pr,n.defaultOptions||{}),ee(this,Ms,new Map),ee(this,Us,new Map),ee(this,hr,0)}mount(){wa(this,hr)._++,R(this,hr)===1&&(ee(this,Bs,rd.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,He).onFocus())})),ee(this,zs,Ba.subscribe(async n=>{n&&(await this.resumePausedMutations(),R(this,He).onOnline())})))}unmount(){var n,t;wa(this,hr)._--,R(this,hr)===0&&((n=R(this,Bs))==null||n.call(this),ee(this,Bs,void 0),(t=R(this,zs))==null||t.call(this),ee(this,zs,void 0))}isFetching(n){return R(this,He).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return R(this,fr).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,He).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const t=this.defaultQueryOptions(n),s=R(this,He).build(this,t),o=s.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(gr(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(n){return R(this,He).findAll(n).map(({queryKey:t,state:s})=>{const o=s.data;return[t,o]})}setQueryData(n,t,s){const o=this.defaultQueryOptions({queryKey:n}),a=R(this,He).get(o.queryHash),u=a==null?void 0:a.state.data,d=C1(t,u);if(d!==void 0)return R(this,He).build(this,o).setData(d,{...s,manual:!0})}setQueriesData(n,t,s){return dt.batch(()=>R(this,He).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,t,s)]))}getQueryState(n){var s;const t=this.defaultQueryOptions({queryKey:n});return(s=R(this,He).get(t.queryHash))==null?void 0:s.state}removeQueries(n){const t=R(this,He);dt.batch(()=>{t.findAll(n).forEach(s=>{t.remove(s)})})}resetQueries(n,t){const s=R(this,He);return dt.batch(()=>(s.findAll(n).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...n},t)))}cancelQueries(n,t={}){const s={revert:!0,...t},o=dt.batch(()=>R(this,He).findAll(n).map(a=>a.cancel(s)));return Promise.all(o).then(Pt).catch(Pt)}invalidateQueries(n,t={}){return dt.batch(()=>(R(this,He).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},t)))}refetchQueries(n,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},o=dt.batch(()=>R(this,He).findAll(n).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(Pt)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(o).then(Pt)}fetchQuery(n){const t=this.defaultQueryOptions(n);t.retry===void 0&&(t.retry=!1);const s=R(this,He).build(this,t);return s.isStaleByTime(gr(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Pt).catch(Pt)}fetchInfiniteQuery(n){return n.behavior=Wh(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Pt).catch(Pt)}ensureInfiniteQueryData(n){return n.behavior=Wh(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return Ba.isOnline()?R(this,fr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,He)}getMutationCache(){return R(this,fr)}getDefaultOptions(){return R(this,pr)}setDefaultOptions(n){ee(this,pr,n)}setQueryDefaults(n,t){R(this,Ms).set(Qo(n),{queryKey:n,defaultOptions:t})}getQueryDefaults(n){const t=[...R(this,Ms).values()],s={};return t.forEach(o=>{Ko(n,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(n,t){R(this,Us).set(Qo(n),{mutationKey:n,defaultOptions:t})}getMutationDefaults(n){const t=[...R(this,Us).values()],s={};return t.forEach(o=>{Ko(n,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const t={...R(this,pr).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return t.queryHash||(t.queryHash=td(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===nd&&(t.enabled=!1),t}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...R(this,pr).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){R(this,He).clear(),R(this,fr).clear()}},He=new WeakMap,fr=new WeakMap,pr=new WeakMap,Ms=new WeakMap,Us=new WeakMap,hr=new WeakMap,Bs=new WeakMap,zs=new WeakMap,Zm),ay=b.createContext(void 0),Q1=n=>{const t=b.useContext(ay);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},K1=({client:n,children:t})=>(b.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),g.jsx(ay.Provider,{value:n,children:t})),ly=b.createContext(!1),G1=()=>b.useContext(ly);ly.Provider;function Y1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var X1=b.createContext(Y1()),J1=()=>b.useContext(X1),Z1=(n,t,s)=>{const o=s!=null&&s.state.error&&typeof n.throwOnError=="function"?ty(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||o)&&(t.isReset()||(n.retryOnMount=!1))},eE=n=>{b.useEffect(()=>{n.clearReset()},[n])},tE=({result:n,errorResetBoundary:t,throwOnError:s,query:o,suspense:a})=>n.isError&&!t.isReset()&&!n.isFetching&&o&&(a&&n.data===void 0||ty(s,[n.error,o])),nE=n=>{if(n.suspense){const s=a=>a==="static"?a:Math.max(a??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...a)=>s(o(...a)):s(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},rE=(n,t)=>n.isLoading&&n.isFetching&&!t,sE=(n,t)=>(n==null?void 0:n.suspense)&&t.isPending,qh=(n,t,s)=>t.fetchOptimistic(n).catch(()=>{s.clearReset()});function oE(n,t,s){var k,j,M,_;const o=G1(),a=J1(),u=Q1(),d=u.defaultQueryOptions(n);(j=(k=u.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||j.call(k,d);const p=u.getQueryCache().get(d.queryHash);d._optimisticResults=o?"isRestoring":"optimistic",nE(d),Z1(d,a,p),eE(a);const h=!u.getQueryCache().get(d.queryHash),[m]=b.useState(()=>new t(u,d)),v=m.getOptimisticResult(d),w=!o&&n.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(x=>{const S=w?m.subscribe(dt.batchCalls(x)):Pt;return m.updateResult(),S},[m,w]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),b.useEffect(()=>{m.setOptions(d)},[d,m]),sE(d,v))throw qh(d,m,a);if(tE({result:v,errorResetBoundary:a,throwOnError:d.throwOnError,query:p,suspense:d.suspense}))throw v.error;if((_=(M=u.getDefaultOptions().queries)==null?void 0:M._experimental_afterQuery)==null||_.call(M,d,v),d.experimental_prefetchInRender&&!Xr&&rE(v,o)){const x=h?qh(d,m,a):p==null?void 0:p.promise;x==null||x.catch(Pt).finally(()=>{m.updateResult()})}return d.notifyOnChangeProps?v:m.trackResult(v)}function iE(n,t){return oE(n,M1)}const aE=new q1({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Go(){return Go=Object.assign?Object.assign.bind():function(n){for(var t=1;t"u")throw new Error(t)}function od(n,t){if(!n){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function uE(){return Math.random().toString(36).substr(2,8)}function Kh(n,t){return{usr:n.state,key:n.key,idx:t}}function Pc(n,t,s,o){return s===void 0&&(s=null),Go({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof t=="string"?Hs(t):t,{state:s,key:t&&t.key||o||uE()})}function za(n){let{pathname:t="/",search:s="",hash:o=""}=n;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function Hs(n){let t={};if(n){let s=n.indexOf("#");s>=0&&(t.hash=n.substr(s),n=n.substr(0,s));let o=n.indexOf("?");o>=0&&(t.search=n.substr(o),n=n.substr(0,o)),n&&(t.pathname=n)}return t}function cE(n,t,s,o){o===void 0&&(o={});let{window:a=document.defaultView,v5Compat:u=!1}=o,d=a.history,p=mr.Pop,h=null,m=v();m==null&&(m=0,d.replaceState(Go({},d.state,{idx:m}),""));function v(){return(d.state||{idx:null}).idx}function w(){p=mr.Pop;let x=v(),S=x==null?null:x-m;m=x,h&&h({action:p,location:_.location,delta:S})}function k(x,S){p=mr.Push;let L=Pc(_.location,x,S);m=v()+1;let N=Kh(L,m),A=_.createHref(L);try{d.pushState(N,"",A)}catch(V){if(V instanceof DOMException&&V.name==="DataCloneError")throw V;a.location.assign(A)}u&&h&&h({action:p,location:_.location,delta:1})}function j(x,S){p=mr.Replace;let L=Pc(_.location,x,S);m=v();let N=Kh(L,m),A=_.createHref(L);d.replaceState(N,"",A),u&&h&&h({action:p,location:_.location,delta:0})}function M(x){let S=a.location.origin!=="null"?a.location.origin:a.location.href,L=typeof x=="string"?x:za(x);return L=L.replace(/ $/,"%20"),Xe(S,"No window.location.(origin|href) available to create URL for href: "+L),new URL(L,S)}let _={get action(){return p},get location(){return n(a,d)},listen(x){if(h)throw new Error("A history only accepts one active listener");return a.addEventListener(Qh,w),h=x,()=>{a.removeEventListener(Qh,w),h=null}},createHref(x){return t(a,x)},createURL:M,encodeLocation(x){let S=M(x);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:k,replace:j,go(x){return d.go(x)}};return _}var Gh;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Gh||(Gh={}));function dE(n,t,s){return s===void 0&&(s="/"),fE(n,t,s)}function fE(n,t,s,o){let a=typeof t=="string"?Hs(t):t,u=id(a.pathname||"/",s);if(u==null)return null;let d=uy(n);pE(d);let p=null,h=kE(u);for(let m=0;p==null&&m{let h={relativePath:p===void 0?u.path||"":p,caseSensitive:u.caseSensitive===!0,childrenIndex:d,route:u};h.relativePath.startsWith("/")&&(Xe(h.relativePath.startsWith(o),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(o.length));let m=yr([o,h.relativePath]),v=s.concat(h);u.children&&u.children.length>0&&(Xe(u.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+m+'".')),uy(u.children,t,v,m)),!(u.path==null&&!u.index)&&t.push({path:m,score:xE(m,u.index),routesMeta:v})};return n.forEach((u,d)=>{var p;if(u.path===""||!((p=u.path)!=null&&p.includes("?")))a(u,d);else for(let h of cy(u.path))a(u,d,h)}),t}function cy(n){let t=n.split("/");if(t.length===0)return[];let[s,...o]=t,a=s.endsWith("?"),u=s.replace(/\?$/,"");if(o.length===0)return a?[u,""]:[u];let d=cy(o.join("/")),p=[];return p.push(...d.map(h=>h===""?u:[u,h].join("/"))),a&&p.push(...d),p.map(h=>n.startsWith("/")&&h===""?"/":h)}function pE(n){n.sort((t,s)=>t.score!==s.score?s.score-t.score:EE(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const hE=/^:[\w-]+$/,mE=3,gE=2,yE=1,vE=10,wE=-2,Yh=n=>n==="*";function xE(n,t){let s=n.split("/"),o=s.length;return s.some(Yh)&&(o+=wE),t&&(o+=gE),s.filter(a=>!Yh(a)).reduce((a,u)=>a+(hE.test(u)?mE:u===""?yE:vE),o)}function EE(n,t){return n.length===t.length&&n.slice(0,-1).every((o,a)=>o===t[a])?n[n.length-1]-t[t.length-1]:0}function SE(n,t,s){let{routesMeta:o}=n,a={},u="/",d=[];for(let p=0;p{let{paramName:k,isOptional:j}=v;if(k==="*"){let _=p[w]||"";d=u.slice(0,u.length-_.length).replace(/(.)\/+$/,"$1")}const M=p[w];return j&&!M?m[k]=void 0:m[k]=(M||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:d,pattern:n}}function _E(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),od(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let o=[],a="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,p,h)=>(o.push({paramName:p,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(o.push({paramName:"*"}),a+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?a+="\\/*$":n!==""&&n!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),o]}function kE(n){try{return n.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return od(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),n}}function id(n,t){if(t==="/")return n;if(!n.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=n.charAt(s);return o&&o!=="/"?null:n.slice(s)||"/"}const CE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,RE=n=>CE.test(n);function TE(n,t){t===void 0&&(t="/");let{pathname:s,search:o="",hash:a=""}=typeof n=="string"?Hs(n):n,u;if(s)if(RE(s))u=s;else{if(s.includes("//")){let d=s;s=py(s),od(!1,"Pathnames cannot have embedded double slashes - normalizing "+(d+" -> "+s))}s.startsWith("/")?u=Xh(s.substring(1),"/"):u=Xh(s,t)}else u=t;return{pathname:u,search:OE(o),hash:AE(a)}}function Xh(n,t){let s=t.replace(/\/+$/,"").split("/");return n.split("/").forEach(a=>{a===".."?s.length>1&&s.pop():a!=="."&&s.push(a)}),s.length>1?s.join("/"):"/"}function Yu(n,t,s,o){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function NE(n){return n.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function dy(n,t){let s=NE(n);return t?s.map((o,a)=>a===s.length-1?o.pathname:o.pathnameBase):s.map(o=>o.pathnameBase)}function fy(n,t,s,o){o===void 0&&(o=!1);let a;typeof n=="string"?a=Hs(n):(a=Go({},n),Xe(!a.pathname||!a.pathname.includes("?"),Yu("?","pathname","search",a)),Xe(!a.pathname||!a.pathname.includes("#"),Yu("#","pathname","hash",a)),Xe(!a.search||!a.search.includes("#"),Yu("#","search","hash",a)));let u=n===""||a.pathname==="",d=u?"/":a.pathname,p;if(d==null)p=s;else{let w=t.length-1;if(!o&&d.startsWith("..")){let k=d.split("/");for(;k[0]==="..";)k.shift(),w-=1;a.pathname=k.join("/")}p=w>=0?t[w]:"/"}let h=TE(a,p),m=d&&d!=="/"&&d.endsWith("/"),v=(u||d===".")&&s.endsWith("/");return!h.pathname.endsWith("/")&&(m||v)&&(h.pathname+="/"),h}const py=n=>n.replace(/\/\/+/g,"/"),yr=n=>py(n.join("/")),PE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),OE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,AE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function jE(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const hy=["post","put","patch","delete"];new Set(hy);const LE=["get",...hy];new Set(LE);/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Yo(){return Yo=Object.assign?Object.assign.bind():function(n){for(var t=1;t{p.current=!0}),b.useCallback(function(m,v){if(v===void 0&&(v={}),!p.current)return;if(typeof m=="number"){o.go(m);return}let w=fy(m,JSON.parse(d),u,v.relative==="path");n==null&&t!=="/"&&(w.pathname=w.pathname==="/"?t:yr([t,w.pathname])),(v.replace?o.replace:o.push)(w,v.state,v)},[t,o,d,u,n])}function yy(n,t){let{relative:s}=t===void 0?{}:t,{future:o}=b.useContext(ts),{matches:a}=b.useContext(ns),{pathname:u}=rs(),d=JSON.stringify(dy(a,o.v7_relativeSplatPath));return b.useMemo(()=>fy(n,JSON.parse(d),u,s==="path"),[n,d,u,s])}function BE(n,t){return zE(n,t)}function zE(n,t,s,o){ii()||Xe(!1);let{navigator:a}=b.useContext(ts),{matches:u}=b.useContext(ns),d=u[u.length-1],p=d?d.params:{};d&&d.pathname;let h=d?d.pathnameBase:"/";d&&d.route;let m=rs(),v;if(t){var w;let x=typeof t=="string"?Hs(t):t;h==="/"||(w=x.pathname)!=null&&w.startsWith(h)||Xe(!1),v=x}else v=m;let k=v.pathname||"/",j=k;if(h!=="/"){let x=h.replace(/^\//,"").split("/");j="/"+k.replace(/^\//,"").split("/").slice(x.length).join("/")}let M=dE(n,{pathname:j}),_=qE(M&&M.map(x=>Object.assign({},x,{params:Object.assign({},p,x.params),pathname:yr([h,a.encodeLocation?a.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?h:yr([h,a.encodeLocation?a.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),u,s,o);return t&&_?b.createElement(oi.Provider,{value:{location:Yo({pathname:"/",search:"",hash:"",state:null,key:"default"},v),navigationType:mr.Pop}},_):_}function $E(){let n=YE(),t=jE(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),s=n instanceof Error?n.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),s?b.createElement("pre",{style:a},s):null,null)}const VE=b.createElement($E,null);class WE extends b.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?b.createElement(ns.Provider,{value:this.props.routeContext},b.createElement(my.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function HE(n){let{routeContext:t,match:s,children:o}=n,a=b.useContext(ad);return a&&a.static&&a.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=s.route.id),b.createElement(ns.Provider,{value:t},o)}function qE(n,t,s,o){var a;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),n==null){var u;if(!s)return null;if(s.errors)n=s.matches;else if((u=o)!=null&&u.v7_partialHydration&&t.length===0&&!s.initialized&&s.matches.length>0)n=s.matches;else return null}let d=n,p=(a=s)==null?void 0:a.errors;if(p!=null){let v=d.findIndex(w=>w.route.id&&(p==null?void 0:p[w.route.id])!==void 0);v>=0||Xe(!1),d=d.slice(0,Math.min(d.length,v+1))}let h=!1,m=-1;if(s&&o&&o.v7_partialHydration)for(let v=0;v=0?d=d.slice(0,m+1):d=[d[0]];break}}}return d.reduceRight((v,w,k)=>{let j,M=!1,_=null,x=null;s&&(j=p&&w.route.id?p[w.route.id]:void 0,_=w.route.errorElement||VE,h&&(m<0&&k===0?(JE("route-fallback"),M=!0,x=null):m===k&&(M=!0,x=w.route.hydrateFallbackElement||null)));let S=t.concat(d.slice(0,k+1)),L=()=>{let N;return j?N=_:M?N=x:w.route.Component?N=b.createElement(w.route.Component,null):w.route.element?N=w.route.element:N=v,b.createElement(HE,{match:w,routeContext:{outlet:v,matches:S,isDataRoute:s!=null},children:N})};return s&&(w.route.ErrorBoundary||w.route.errorElement||k===0)?b.createElement(WE,{location:s.location,revalidation:s.revalidation,component:_,error:j,children:L(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):L()},null)}var vy=(function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n})(vy||{}),wy=(function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n})(wy||{});function QE(n){let t=b.useContext(ad);return t||Xe(!1),t}function KE(n){let t=b.useContext(IE);return t||Xe(!1),t}function GE(n){let t=b.useContext(ns);return t||Xe(!1),t}function xy(n){let t=GE(),s=t.matches[t.matches.length-1];return s.route.id||Xe(!1),s.route.id}function YE(){var n;let t=b.useContext(my),s=KE(),o=xy();return t!==void 0?t:(n=s.errors)==null?void 0:n[o]}function XE(){let{router:n}=QE(vy.UseNavigateStable),t=xy(wy.UseNavigateStable),s=b.useRef(!1);return gy(()=>{s.current=!0}),b.useCallback(function(a,u){u===void 0&&(u={}),s.current&&(typeof a=="number"?n.navigate(a):n.navigate(a,Yo({fromRouteId:t},u)))},[n,t])}const Jh={};function JE(n,t,s){Jh[n]||(Jh[n]=!0)}function ZE(n,t){n==null||n.v7_startTransition,n==null||n.v7_relativeSplatPath}function Oc(n){Xe(!1)}function eS(n){let{basename:t="/",children:s=null,location:o,navigationType:a=mr.Pop,navigator:u,static:d=!1,future:p}=n;ii()&&Xe(!1);let h=t.replace(/^\/*/,"/"),m=b.useMemo(()=>({basename:h,navigator:u,static:d,future:Yo({v7_relativeSplatPath:!1},p)}),[h,p,u,d]);typeof o=="string"&&(o=Hs(o));let{pathname:v="/",search:w="",hash:k="",state:j=null,key:M="default"}=o,_=b.useMemo(()=>{let x=id(v,h);return x==null?null:{location:{pathname:x,search:w,hash:k,state:j,key:M},navigationType:a}},[h,v,w,k,j,M,a]);return _==null?null:b.createElement(ts.Provider,{value:m},b.createElement(oi.Provider,{children:s,value:_}))}function tS(n){let{children:t,location:s}=n;return BE(Ac(t),s)}new Promise(()=>{});function Ac(n,t){t===void 0&&(t=[]);let s=[];return b.Children.forEach(n,(o,a)=>{if(!b.isValidElement(o))return;let u=[...t,a];if(o.type===b.Fragment){s.push.apply(s,Ac(o.props.children,u));return}o.type!==Oc&&Xe(!1),!o.props.index||!o.props.children||Xe(!1);let d={id:o.props.id||u.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(d.children=Ac(o.props.children,u)),s.push(d)}),s}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function jc(){return jc=Object.assign?Object.assign.bind():function(n){for(var t=1;t{m&&Zh?Zh(()=>h(w)):h(w)},[h,m]);return b.useLayoutEffect(()=>d.listen(v),[d,v]),b.useEffect(()=>ZE(o),[o]),b.createElement(eS,{basename:t,children:s,location:p.location,navigationType:p.action,navigator:d,future:o})}const uS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yt=b.forwardRef(function(t,s){let{onClick:o,relative:a,reloadDocument:u,replace:d,state:p,target:h,to:m,preventScrollReset:v,viewTransition:w}=t,k=nS(t,oS),{basename:j}=b.useContext(ts),M,_=!1;if(typeof m=="string"&&cS.test(m)&&(M=m,uS))try{let N=new URL(window.location.href),A=m.startsWith("//")?new URL(N.protocol+m):new URL(m),V=id(A.pathname,j);A.origin===N.origin&&V!=null?m=V+A.search+A.hash:_=!0}catch{}let x=DE(m,{relative:a}),S=dS(m,{replace:d,state:p,target:h,preventScrollReset:v,relative:a,viewTransition:w});function L(N){o&&o(N),N.defaultPrevented||S(N)}return b.createElement("a",jc({},k,{href:M||x,onClick:_||u?o:L,ref:s,target:h}))});var em;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(em||(em={}));var tm;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(tm||(tm={}));function dS(n,t){let{target:s,replace:o,state:a,preventScrollReset:u,relative:d,viewTransition:p}=t===void 0?{}:t,h=ME(),m=rs(),v=yy(n,{relative:d});return b.useCallback(w=>{if(sS(w,s)){w.preventDefault();let k=o!==void 0?o:za(m)===za(v);h(n,{replace:k,state:a,preventScrollReset:u,relative:d,viewTransition:p})}},[m,h,v,o,a,s,n,u,d,p])}function Ey(n,t){return function(){return n.apply(t,arguments)}}const{toString:fS}=Object.prototype,{getPrototypeOf:$s}=Object,{iterator:ai,toStringTag:Sy}=Symbol,$a=(({hasOwnProperty:n})=>(t,s)=>n.call(t,s))(Object.prototype),Xo=(n,t)=>{let s=n;const o=[];for(;s!=null&&s!==Object.prototype;){if(o.indexOf(s)!==-1)return!1;if(o.push(s),$a(s,t))return!0;s=$s(s)}return!1},pS=(n,t)=>n!=null&&Xo(n,t)?n[t]:void 0,ld=(n=>t=>{const s=fS.call(t);return n[s]||(n[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),dn=n=>(n=n.toLowerCase(),t=>ld(t)===n),qa=n=>t=>typeof t===n,{isArray:Jr}=Array,Vs=qa("undefined");function qs(n){return n!==null&&!Vs(n)&&n.constructor!==null&&!Vs(n.constructor)&&Ot(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const by=dn("ArrayBuffer");function hS(n){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(n):t=n&&n.buffer&&by(n.buffer),t}const mS=qa("string"),Ot=qa("function"),_y=qa("number"),Qs=n=>n!==null&&typeof n=="object",gS=n=>n===!0||n===!1,Aa=n=>{if(!Qs(n))return!1;const t=$s(n);return(t===null||t===Object.prototype||$s(t)===null)&&!Xo(n,Sy)&&!Xo(n,ai)},yS=n=>{if(!Qs(n)||qs(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch{return!1}},vS=dn("Date"),wS=dn("File"),xS=n=>!!(n&&typeof n.uri<"u"),ES=n=>n&&typeof n.getParts<"u",SS=dn("Blob"),bS=dn("FileList"),_S=n=>Qs(n)&&Ot(n.pipe);function kS(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const nm=kS(),rm=typeof nm.FormData<"u"?nm.FormData:void 0,CS=n=>{if(!n)return!1;if(rm&&n instanceof rm)return!0;const t=$s(n);if(!t||t===Object.prototype||!Ot(n.append))return!1;const s=ld(n);return s==="formdata"||s==="object"&&Ot(n.toString)&&n.toString()==="[object FormData]"},RS=dn("URLSearchParams"),[TS,NS,PS,OS]=["ReadableStream","Request","Response","Headers"].map(dn),AS=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function li(n,t,{allOwnKeys:s=!1}={}){if(n===null||typeof n>"u")return;let o,a;if(typeof n!="object"&&(n=[n]),Jr(n))for(o=0,a=n.length;o0;)if(a=s[o],t===a.toLowerCase())return a;return null}const Fr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cy=n=>!Vs(n)&&n!==Fr;function Lc(...n){const{caseless:t,skipUndefined:s}=Cy(this)&&this||{},o={},a=(u,d)=>{if(d==="__proto__"||d==="constructor"||d==="prototype")return;const p=t&&typeof d=="string"&&ky(o,d)||d,h=$a(o,p)?o[p]:void 0;Aa(h)&&Aa(u)?o[p]=Lc(h,u):Aa(u)?o[p]=Lc({},u):Jr(u)?o[p]=u.slice():(!s||!Vs(u))&&(o[p]=u)};for(let u=0,d=n.length;u(li(t,(a,u)=>{s&&Ot(a)?Object.defineProperty(n,u,{__proto__:null,value:Ey(a,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(n,u,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:o}),n),LS=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),IS=(n,t,s,o)=>{n.prototype=Object.create(t.prototype,o),Object.defineProperty(n.prototype,"constructor",{__proto__:null,value:n,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(n,"super",{__proto__:null,value:t.prototype}),s&&Object.assign(n.prototype,s)},DS=(n,t,s,o)=>{let a,u,d;const p={};if(t=t||{},n==null)return t;do{for(a=Object.getOwnPropertyNames(n),u=a.length;u-- >0;)d=a[u],(!o||o(d,n,t))&&!p[d]&&(t[d]=n[d],p[d]=!0);n=s!==!1&&$s(n)}while(n&&(!s||s(n,t))&&n!==Object.prototype);return t},FS=(n,t,s)=>{n=String(n),(s===void 0||s>n.length)&&(s=n.length),s-=t.length;const o=n.indexOf(t,s);return o!==-1&&o===s},MS=n=>{if(!n)return null;if(Jr(n))return n;let t=n.length;if(!_y(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=n[t];return s},US=(n=>t=>n&&t instanceof n)(typeof Uint8Array<"u"&&$s(Uint8Array)),BS=(n,t)=>{const o=(n&&n[ai]).call(n);let a;for(;(a=o.next())&&!a.done;){const u=a.value;t.call(n,u[0],u[1])}},zS=(n,t)=>{let s;const o=[];for(;(s=n.exec(t))!==null;)o.push(s);return o},$S=dn("HTMLFormElement"),VS=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,o,a){return o.toUpperCase()+a}),{propertyIsEnumerable:WS}=Object.prototype,HS=dn("RegExp"),Ry=(n,t)=>{const s=Object.getOwnPropertyDescriptors(n),o={};li(s,(a,u)=>{let d;(d=t(a,u,n))!==!1&&(o[u]=d||a)}),Object.defineProperties(n,o)},qS=n=>{Ry(n,(t,s)=>{if(Ot(n)&&["arguments","caller","callee"].includes(s))return!1;const o=n[s];if(Ot(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},QS=(n,t)=>{const s={},o=a=>{a.forEach(u=>{s[u]=!0})};return Jr(n)?o(n):o(String(n).split(t)),s},KS=()=>{},GS=(n,t)=>n!=null&&Number.isFinite(n=+n)?n:t;function YS(n){return!!(n&&Ot(n.append)&&n[Sy]==="FormData"&&n[ai])}const XS=n=>{const t=new WeakSet,s=o=>{if(Qs(o)){if(t.has(o))return;if(qs(o))return o;if(!("toJSON"in o)){t.add(o);const a=Jr(o)?[]:{};return li(o,(u,d)=>{const p=s(u);!Vs(p)&&(a[d]=p)}),t.delete(o),a}}return o};return s(n)},JS=dn("AsyncFunction"),ZS=n=>n&&(Qs(n)||Ot(n))&&Ot(n.then)&&Ot(n.catch),Ty=((n,t)=>n?setImmediate:t?((s,o)=>(Fr.addEventListener("message",({source:a,data:u})=>{a===Fr&&u===s&&o.length&&o.shift()()},!1),a=>{o.push(a),Fr.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",Ot(Fr.postMessage)),eb=typeof queueMicrotask<"u"?queueMicrotask.bind(Fr):typeof process<"u"&&process.nextTick||Ty,Ny=n=>n!=null&&Ot(n[ai]),tb=n=>n!=null&&Xo(n,ai)&&Ny(n),O={isArray:Jr,isArrayBuffer:by,isBuffer:qs,isFormData:CS,isArrayBufferView:hS,isString:mS,isNumber:_y,isBoolean:gS,isObject:Qs,isPlainObject:Aa,isEmptyObject:yS,isReadableStream:TS,isRequest:NS,isResponse:PS,isHeaders:OS,isUndefined:Vs,isDate:vS,isFile:wS,isReactNativeBlob:xS,isReactNative:ES,isBlob:SS,isRegExp:HS,isFunction:Ot,isStream:_S,isURLSearchParams:RS,isTypedArray:US,isFileList:bS,forEach:li,merge:Lc,extend:jS,trim:AS,stripBOM:LS,inherits:IS,toFlatObject:DS,kindOf:ld,kindOfTest:dn,endsWith:FS,toArray:MS,forEachEntry:BS,matchAll:zS,isHTMLForm:$S,hasOwnProperty:$a,hasOwnProp:$a,hasOwnInPrototypeChain:Xo,getSafeProp:pS,reduceDescriptors:Ry,freezeMethods:qS,toObjectSet:QS,toCamelCase:VS,noop:KS,toFiniteNumber:GS,findKey:ky,global:Fr,isContextDefined:Cy,isSpecCompliantForm:YS,toJSONObject:XS,isAsyncFn:JS,isThenable:ZS,setImmediate:Ty,asap:eb,isIterable:Ny,isSafeIterable:tb},nb=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rb=n=>{const t={};let s,o,a;return n&&n.split(` `).forEach(function(d){a=d.indexOf(":"),s=d.substring(0,a).trim().toLowerCase(),o=d.substring(a+1).trim(),!(!s||t[s]&&nb[s])&&(s==="set-cookie"?t[s]?t[s].push(o):t[s]=[o]:t[s]=t[s]?t[s]+", "+o:o)}),t};function sb(n){let t=0,s=n.length;for(;tt;){const o=n.charCodeAt(s-1);if(o!==9&&o!==32)break;s-=1}return t===0&&s===n.length?n:n.slice(t,s)}const ob=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ib=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ud(n,t){return O.isArray(n)?n.map(s=>ud(s,t)):sb(String(n).replace(t,""))}const ab=n=>ud(n,ob),lb=n=>ud(n,ib);function Py(n){const t=Object.create(null);return O.forEach(n.toJSON(),(s,o)=>{t[o]=lb(s)}),t}const sm=Symbol("internals");function Do(n){return n&&String(n).trim().toLowerCase()}function ja(n){return n===!1||n==null?n:O.isArray(n)?n.map(ja):ab(String(n))}function ub(n){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=s.exec(n);)t[o[1]]=o[2];return t}const cb=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function Xu(n,t,s,o,a){if(O.isFunction(o))return o.call(this,t,s);if(a&&(t=s),!!O.isString(t)){if(O.isString(o))return t.indexOf(o)!==-1;if(O.isRegExp(o))return o.test(t)}}function db(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,o)=>s.toUpperCase()+o)}function fb(n,t){const s=O.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+s,{__proto__:null,value:function(a,u,d){return this[o].call(this,t,a,u,d)},configurable:!0})})}let wt=class{constructor(t){t&&this.set(t)}set(t,s,o){const a=this;function u(p,h,m){const v=Do(h);if(!v)return;const w=O.findKey(a,v);(!w||a[w]===void 0||m===!0||m===void 0&&a[w]!==!1)&&(a[w||h]=ja(p))}const d=(p,h)=>O.forEach(p,(m,v)=>u(m,v,h));if(O.isPlainObject(t)||t instanceof this.constructor)d(t,s);else if(O.isString(t)&&(t=t.trim())&&!cb(t))d(rb(t),s);else if(O.isObject(t)&&O.isSafeIterable(t)){let p=Object.create(null),h,m;for(const v of t){if(!O.isArray(v))throw new TypeError("Object iterator must return a key-value pair");m=v[0],O.hasOwnProp(p,m)?(h=p[m],p[m]=O.isArray(h)?[...h,v[1]]:[h,v[1]]):p[m]=v[1]}d(p,s)}else t!=null&&u(s,t,o);return this}get(t,s){if(t=Do(t),t){const o=O.findKey(this,t);if(o){const a=this[o];if(!s)return a;if(s===!0)return ub(a);if(O.isFunction(s))return s.call(this,a,o);if(O.isRegExp(s))return s.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Do(t),t){const o=O.findKey(this,t);return!!(o&&this[o]!==void 0&&(!s||Xu(this,this[o],o,s)))}return!1}delete(t,s){const o=this;let a=!1;function u(d){if(d=Do(d),d){const p=O.findKey(o,d);p&&(!s||Xu(o,o[p],p,s))&&(delete o[p],a=!0)}}return O.isArray(t)?t.forEach(u):u(t),a}clear(t){const s=Object.keys(this);let o=s.length,a=!1;for(;o--;){const u=s[o];(!t||Xu(this,this[u],u,t,!0))&&(delete this[u],a=!0)}return a}normalize(t){const s=this,o={};return O.forEach(this,(a,u)=>{const d=O.findKey(o,u);if(d){s[d]=ja(a),delete s[u];return}const p=t?db(u):String(u).trim();p!==u&&delete s[u],s[p]=ja(a),o[p]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return O.forEach(this,(o,a)=>{o!=null&&o!==!1&&(s[a]=t&&O.isArray(o)?o.join(", "):o)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const o=new this(t);return s.forEach(a=>o.set(a)),o}static accessor(t){const o=(this[sm]=this[sm]={accessors:{}}).accessors,a=this.prototype;function u(d){const p=Do(d);o[p]||(fb(a,d),o[p]=!0)}return O.isArray(t)?t.forEach(u):u(t),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(wt.prototype,({value:n},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(o){this[s]=o}}});O.freezeMethods(wt);const pb="[REDACTED ****]";function hb(n){if(O.hasOwnProp(n,"toJSON"))return!0;let t=Object.getPrototypeOf(n);for(;t&&t!==Object.prototype;){if(O.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function mb(n,t){const s=new Set(t.map(u=>String(u).toLowerCase())),o=[],a=u=>{if(u===null||typeof u!="object"||O.isBuffer(u))return u;if(o.indexOf(u)!==-1)return;u instanceof wt&&(u=u.toJSON()),o.push(u);let d;if(O.isArray(u))d=[],u.forEach((p,h)=>{const m=a(p);O.isUndefined(m)||(d[h]=m)});else{if(!O.isPlainObject(u)&&hb(u))return o.pop(),u;d=Object.create(null);for(const[p,h]of Object.entries(u)){const m=s.has(p.toLowerCase())?pb:a(h);O.isUndefined(m)||(d[p]=m)}}return o.pop(),d};return a(n)}let X=class Oy extends Error{static from(t,s,o,a,u,d){const p=new Oy(t.message,s||t.code,o,a,u);return Object.defineProperty(p,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),p.name=t.name,t.status!=null&&p.status==null&&(p.status=t.status),d&&Object.assign(p,d),p}constructor(t,s,o,a,u){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),o&&(this.config=o),a&&(this.request=a),u&&(this.response=u,this.status=u.status)}toJSON(){const t=this.config,s=t&&O.hasOwnProp(t,"redact")?t.redact:void 0,o=O.isArray(s)&&s.length>0?mb(t,s):O.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:o,code:this.code,status:this.status}}};X.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";X.ERR_BAD_OPTION="ERR_BAD_OPTION";X.ECONNABORTED="ECONNABORTED";X.ETIMEDOUT="ETIMEDOUT";X.ECONNREFUSED="ECONNREFUSED";X.ERR_NETWORK="ERR_NETWORK";X.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";X.ERR_DEPRECATED="ERR_DEPRECATED";X.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";X.ERR_BAD_REQUEST="ERR_BAD_REQUEST";X.ERR_CANCELED="ERR_CANCELED";X.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";X.ERR_INVALID_URL="ERR_INVALID_URL";X.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const gb=null,Ay=100;function Ic(n){return O.isPlainObject(n)||O.isArray(n)}function jy(n){return O.endsWith(n,"[]")?n.slice(0,-2):n}function Ju(n,t,s){return n?n.concat(t).map(function(a,u){return a=jy(a),!s&&u?"["+a+"]":a}).join(s?".":""):t}function yb(n){return O.isArray(n)&&!n.some(Ic)}const vb=O.toFlatObject(O,{},null,function(t){return/^is[A-Z]/.test(t)});function Qa(n,t,s){if(!O.isObject(n))throw new TypeError("target must be an object");t=t||new FormData,s=O.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(L,N){return!O.isUndefined(N[L])});const o=s.metaTokens,a=s.visitor||M,u=s.dots,d=s.indexes,p=s.Blob||typeof Blob<"u"&&Blob,h=s.maxDepth===void 0?Ay:s.maxDepth,m=p&&O.isSpecCompliantForm(t),v=[];if(!O.isFunction(a))throw new TypeError("visitor must be a function");function w(S){if(S===null)return"";if(O.isDate(S))return S.toISOString();if(O.isBoolean(S))return S.toString();if(!m&&O.isBlob(S))throw new X("Blob is not supported. Use a Buffer instead.");if(O.isArrayBuffer(S)||O.isTypedArray(S)){if(m&&typeof p=="function")return new p([S]);if(typeof Buffer<"u")return Buffer.from(S);throw new X("Blob is not supported. Use a Buffer instead.",X.ERR_NOT_SUPPORT)}return S}function k(S){if(S>h)throw new X("Object is too deeply nested ("+S+" levels). Max depth: "+h,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function j(S,L){if(h===1/0)return JSON.stringify(S);const N=[];return JSON.stringify(S,function(V,$){if(!O.isObject($))return $;for(;N.length&&N[N.length-1]!==this;)N.pop();return N.push($),k(L+N.length-1),$})}function M(S,L,N){let A=S;if(O.isReactNative(t)&&O.isReactNativeBlob(S))return t.append(Ju(N,L,u),w(S)),!1;if(S&&!N&&typeof S=="object"){if(O.endsWith(L,"{}"))L=o?L:L.slice(0,-2),S=j(S,1);else if(O.isArray(S)&&yb(S)||(O.isFileList(S)||O.endsWith(L,"[]"))&&(A=O.toArray(S)))return L=jy(L),A.forEach(function($,G){!(O.isUndefined($)||$===null)&&t.append(d===!0?Ju([L],G,u):d===null?L:L+"[]",w($))}),!1}return Ic(S)?!0:(t.append(Ju(N,L,u),w(S)),!1)}const _=Object.assign(vb,{defaultVisitor:M,convertValue:w,isVisitable:Ic});function x(S,L,N=0){if(!O.isUndefined(S)){if(k(N),v.indexOf(S)!==-1)throw new Error("Circular reference detected in "+L.join("."));v.push(S),O.forEach(S,function(V,$){(!(O.isUndefined(V)||V===null)&&a.call(t,V,O.isString($)?$.trim():$,L,_))===!0&&x(V,L?L.concat($):[$],N+1)}),v.pop()}}if(!O.isObject(n))throw new TypeError("data must be an object");return x(n),t}function om(n){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(n).replace(/[!'()~]|%20/g,function(o){return t[o]})}function cd(n,t){this._pairs=[],n&&Qa(n,this,t)}const Ly=cd.prototype;Ly.append=function(t,s){this._pairs.push([t,s])};Ly.toString=function(t){const s=t?o=>t.call(this,o,om):om;return this._pairs.map(function(a){return s(a[0])+"="+s(a[1])},"").join("&")};function wb(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Iy(n,t,s){if(!t)return n;n=n||"";const o=O.isFunction(s)?{serialize:s}:s,a=O.getSafeProp(o,"encode")||wb,u=O.getSafeProp(o,"serialize");let d;if(u?d=u(t,o):d=O.isURLSearchParams(t)?t.toString():new cd(t,o).toString(a),d){const p=n.indexOf("#");p!==-1&&(n=n.slice(0,p)),n+=(n.indexOf("?")===-1?"?":"&")+d}return n}class im{constructor(){this.handlers=[]}use(t,s,o){return this.handlers.push({fulfilled:t,rejected:s,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){O.forEach(this.handlers,function(o){o!==null&&t(o)})}}const dd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xb=typeof URLSearchParams<"u"?URLSearchParams:cd,Eb=typeof FormData<"u"?FormData:null,Sb=typeof Blob<"u"?Blob:null,bb={isBrowser:!0,classes:{URLSearchParams:xb,FormData:Eb,Blob:Sb},protocols:["http","https","file","blob","url","data"]},fd=typeof window<"u"&&typeof document<"u",Dc=typeof navigator=="object"&&navigator||void 0,_b=fd&&(!Dc||["ReactNative","NativeScript","NS"].indexOf(Dc.product)<0),kb=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Cb=fd&&window.location.href||"http://localhost",Rb=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:fd,hasStandardBrowserEnv:_b,hasStandardBrowserWebWorkerEnv:kb,navigator:Dc,origin:Cb},Symbol.toStringTag,{value:"Module"})),ft={...Rb,...bb};function Tb(n,t){return Qa(n,new ft.classes.URLSearchParams,{visitor:function(s,o,a,u){return ft.isNode&&O.isBuffer(s)?(this.append(o,s.toString("base64")),!1):u.defaultVisitor.apply(this,arguments)},...t})}const am=Ay;function Dy(n){if(n>am)throw new X("FormData field is too deeply nested ("+n+" levels). Max depth: "+am,X.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Nb(n){const t=[],s=/\w+|\[(\w*)]/g;let o;for(;(o=s.exec(n))!==null;)Dy(t.length),t.push(o[0]==="[]"?"":o[1]||o[0]);return t}function Pb(n){const t={},s=Object.keys(n);let o;const a=s.length;let u;for(o=0;o=s.length;return d=!d&&O.isArray(a)?a.length:d,h?(O.hasOwnProp(a,d)?a[d]=O.isArray(a[d])?a[d].concat(o):[a[d],o]:a[d]=o,!p):((!O.hasOwnProp(a,d)||!O.isObject(a[d]))&&(a[d]=[]),t(s,o,a[d],u)&&O.isArray(a[d])&&(a[d]=Pb(a[d])),!p)}if(O.isFormData(n)&&O.isFunction(n.entries)){const s={};return O.forEachEntry(n,(o,a)=>{t(Nb(o),a,s,0)}),s}return null}const Ts=(n,t)=>n!=null&&O.hasOwnProp(n,t)?n[t]:void 0;function Ob(n,t,s){if(O.isString(n))try{return(t||JSON.parse)(n),O.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(s||JSON.stringify)(n)}const ui={transitional:dd,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const o=s.getContentType()||"",a=o.indexOf("application/json")>-1,u=O.isObject(t);if(u&&O.isHTMLForm(t)&&(t=new FormData(t)),O.isFormData(t))return a?JSON.stringify(Fy(t)):t;if(O.isArrayBuffer(t)||O.isBuffer(t)||O.isStream(t)||O.isFile(t)||O.isBlob(t)||O.isReadableStream(t))return t;if(O.isArrayBufferView(t))return t.buffer;if(O.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let p;if(u){const h=Ts(this,"formSerializer");if(o.indexOf("application/x-www-form-urlencoded")>-1)return Tb(t,h).toString();if((p=O.isFileList(t))||o.indexOf("multipart/form-data")>-1){const m=Ts(this,"env"),v=m&&m.FormData;return Qa(p?{"files[]":t}:t,v&&new v,h)}}return u||a?(s.setContentType("application/json",!1),Ob(t)):t}],transformResponse:[function(t){const s=Ts(this,"transitional")||ui.transitional,o=s&&s.forcedJSONParsing,a=Ts(this,"responseType"),u=a==="json";if(O.isResponse(t)||O.isReadableStream(t))return t;if(t&&O.isString(t)&&(o&&!a||u)){const p=!(s&&s.silentJSONParsing)&&u;try{return JSON.parse(t,Ts(this,"parseReviver"))}catch(h){if(p)throw h.name==="SyntaxError"?X.from(h,X.ERR_BAD_RESPONSE,this,null,Ts(this,"response")):h}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch","query"],n=>{ui.headers[n]={}});function Zu(n,t){const s=this||ui,o=t||s,a=wt.from(o.headers);let u=o.data;return O.forEach(n,function(p){u=p.call(s,u,a.normalize(),t?t.status:void 0)}),a.normalize(),u}function My(n){return!!(n&&n.__CANCEL__)}let ci=class extends X{constructor(t,s,o){super(t??"canceled",X.ERR_CANCELED,s,o),this.name="CanceledError",this.__CANCEL__=!0}};function Uy(n,t,s){const o=s.config.validateStatus;!s.status||!o||o(s.status)?n(s):t(new X("Request failed with status code "+s.status,s.status>=400&&s.status<500?X.ERR_BAD_REQUEST:X.ERR_BAD_RESPONSE,s.config,s.request,s))}function Ab(n){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(n);return t&&t[1]||""}function jb(n,t){n=n||10;const s=new Array(n),o=new Array(n);let a=0,u=0,d;return t=t!==void 0?t:1e3,function(h){const m=Date.now(),v=o[u];d||(d=m),s[a]=h,o[a]=m;let w=u,k=0;for(;w!==a;)k+=s[w++],w=w%n;if(a=(a+1)%n,a===u&&(u=(u+1)%n),m-d{s=v,a=null,u&&(clearTimeout(u),u=null),n(...m)};return[(...m)=>{const v=Date.now(),w=v-s;w>=o?d(m,v):(a=m,u||(u=setTimeout(()=>{u=null,d(a)},o-w)))},()=>a&&d(a)]}const Va=(n,t,s=3)=>{let o=0;const a=jb(50,250);return Lb(u=>{if(!u||typeof u.loaded!="number")return;const d=u.loaded,p=u.lengthComputable?u.total:void 0,h=p!=null?Math.min(d,p):d,m=Math.max(0,h-o),v=a(m);o=Math.max(o,h);const w={loaded:h,total:p,progress:p?h/p:void 0,bytes:m,rate:v||void 0,estimated:v&&p?(p-h)/v:void 0,event:u,lengthComputable:p!=null,[t?"download":"upload"]:!0};n(w)},s)},lm=(n,t)=>{const s=n!=null;return[o=>t[0]({lengthComputable:s,total:n,loaded:o}),t[1]]},um=n=>(...t)=>O.asap(()=>n(...t)),Ib=ft.hasStandardBrowserEnv?((n,t)=>s=>(s=new URL(s,ft.origin),n.protocol===s.protocol&&n.host===s.host&&(t||n.port===s.port)))(new URL(ft.origin),ft.navigator&&/(msie|trident)/i.test(ft.navigator.userAgent)):()=>!0,Db=ft.hasStandardBrowserEnv?{write(n,t,s,o,a,u,d){if(typeof document>"u")return;const p=[`${n}=${encodeURIComponent(t)}`];O.isNumber(s)&&p.push(`expires=${new Date(s).toUTCString()}`),O.isString(o)&&p.push(`path=${o}`),O.isString(a)&&p.push(`domain=${a}`),u===!0&&p.push("secure"),O.isString(d)&&p.push(`SameSite=${d}`),document.cookie=p.join("; ")},read(n){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let s=0;sn instanceof wt?{...n}:n;function Zr(n,t){n=n||{},t=t||{};const s=Object.create(null);Object.defineProperty(s,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function o(v,w,k,j){return O.isPlainObject(v)&&O.isPlainObject(w)?O.merge.call({caseless:j},v,w):O.isPlainObject(w)?O.merge({},w):O.isArray(w)?w.slice():w}function a(v,w,k,j){if(O.isUndefined(w)){if(!O.isUndefined(v))return o(void 0,v,k,j)}else return o(v,w,k,j)}function u(v,w){if(!O.isUndefined(w))return o(void 0,w)}function d(v,w){if(O.isUndefined(w)){if(!O.isUndefined(v))return o(void 0,v)}else return o(void 0,w)}function p(v){const w=O.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!O.isUndefined(w))if(O.isPlainObject(w)){if(O.hasOwnProp(w,v))return w[v]}else return;const k=O.hasOwnProp(n,"transitional")?n.transitional:void 0;if(O.isPlainObject(k)&&O.hasOwnProp(k,v))return k[v]}function h(v,w,k){if(O.hasOwnProp(t,k))return o(v,w);if(O.hasOwnProp(n,k))return o(void 0,v)}const m={url:u,method:u,data:u,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,allowedSocketPaths:d,responseEncoding:d,validateStatus:h,headers:(v,w,k)=>a(dm(v),dm(w),k,!0)};return O.forEach(Object.keys({...n,...t}),function(w){if(w==="__proto__"||w==="constructor"||w==="prototype")return;const k=O.hasOwnProp(m,w)?m[w]:a,j=O.hasOwnProp(n,w)?n[w]:void 0,M=O.hasOwnProp(t,w)?t[w]:void 0,_=k(j,M,w);O.isUndefined(_)&&k!==h||(s[w]=_)}),O.hasOwnProp(t,"validateStatus")&&O.isUndefined(t.validateStatus)&&p("validateStatusUndefinedResolves")===!1&&(O.hasOwnProp(n,"validateStatus")?s.validateStatus=o(void 0,n.validateStatus):delete s.validateStatus),s}const Vb=["content-type","content-length"];function Wb(n,t,s){if(s!=="content-only"){n.set(t);return}Object.entries(t||{}).forEach(([o,a])=>{Vb.includes(o.toLowerCase())&&n.set(o,a)})}const Hb=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16)));function zy(n){const t=Zr({},n),s=k=>O.hasOwnProp(t,k)?t[k]:void 0,o=s("data");let a=s("withXSRFToken");const u=s("xsrfHeaderName"),d=s("xsrfCookieName");let p=s("headers");const h=s("auth"),m=s("baseURL"),v=s("allowAbsoluteUrls"),w=s("url");if(t.headers=p=wt.from(p),t.url=Iy(By(m,w,v,t),s("params"),s("paramsSerializer")),h){const k=O.getSafeProp(h,"username")||"",j=O.getSafeProp(h,"password")||"";try{p.set("Authorization","Basic "+btoa(k+":"+(j?Hb(j):"")))}catch(M){throw X.from(M,X.ERR_BAD_OPTION_VALUE,n)}}if(O.isFormData(o)&&(ft.hasStandardBrowserEnv||ft.hasStandardBrowserWebWorkerEnv||O.isReactNative(o)?p.setContentType(void 0):O.isFunction(o.getHeaders)&&Wb(p,o.getHeaders(),s("formDataHeaderPolicy"))),ft.hasStandardBrowserEnv&&(O.isFunction(a)&&(a=a(t)),a===!0||a==null&&Ib(t.url))){const j=u&&d&&Db.read(d);j&&p.set(u,j)}return t}const qb=typeof XMLHttpRequest<"u",Qb=qb&&function(n){return new Promise(function(s,o){const a=zy(n);let u=a.data;const d=wt.from(a.headers).normalize();let{responseType:p,onUploadProgress:h,onDownloadProgress:m}=a,v,w,k,j,M;function _(){j&&j(),M&&M(),a.cancelToken&&a.cancelToken.unsubscribe(v),a.signal&&a.signal.removeEventListener("abort",v)}let x=new XMLHttpRequest;x.open(a.method.toUpperCase(),a.url,!0),x.timeout=a.timeout;function S(){if(!x)return;const N=wt.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),V={data:!p||p==="text"||p==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:N,config:n,request:x};Uy(function(G){s(G),_()},function(G){o(G),_()},V),x=null}"onloadend"in x?x.onloadend=S:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(S)},x.onabort=function(){x&&(o(new X("Request aborted",X.ECONNABORTED,n,x)),_(),x=null)},x.onerror=function(A){const V=A&&A.message?A.message:"Network Error",$=new X(V,X.ERR_NETWORK,n,x);$.event=A||null,o($),_(),x=null},x.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const V=a.transitional||dd;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),o(new X(A,V.clarifyTimeoutError?X.ETIMEDOUT:X.ECONNABORTED,n,x)),_(),x=null},u===void 0&&d.setContentType(null),"setRequestHeader"in x&&O.forEach(Py(d),function(A,V){x.setRequestHeader(V,A)}),O.isUndefined(a.withCredentials)||(x.withCredentials=!!a.withCredentials),p&&p!=="json"&&(x.responseType=a.responseType),m&&([k,M]=Va(m,!0),x.addEventListener("progress",k)),h&&x.upload&&([w,j]=Va(h),x.upload.addEventListener("progress",w),x.upload.addEventListener("loadend",j)),(a.cancelToken||a.signal)&&(v=N=>{x&&(o(!N||N.type?new ci(null,n,x):N),x.abort(),_(),x=null)},a.cancelToken&&a.cancelToken.subscribe(v),a.signal&&(a.signal.aborted?v():a.signal.addEventListener("abort",v)));const L=Ab(a.url);if(L&&!ft.protocols.includes(L)){o(new X("Unsupported protocol "+L+":",X.ERR_BAD_REQUEST,n)),_();return}x.send(u||null)})},Kb=(n,t)=>{if(n=n?n.filter(Boolean):[],!t&&!n.length)return;const s=new AbortController;let o=!1;const a=function(h){if(!o){o=!0,d();const m=h instanceof Error?h:this.reason;s.abort(m instanceof X?m:new ci(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new X(`timeout of ${t}ms exceeded`,X.ETIMEDOUT))},t);const d=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),n=null)};n.forEach(h=>h.addEventListener("abort",a,{once:!0}));const{signal:p}=s;return p.unsubscribe=()=>O.asap(d),p},Gb=function*(n,t){let s=n.byteLength;if(s{const a=Yb(n,t);let u=0,d,p=h=>{d||(d=!0,o&&o(h))};return new ReadableStream({async pull(h){try{const{done:m,value:v}=await a.next();if(m){p(),h.close();return}let w=v.byteLength;if(s){let k=u+=w;s(k)}h.enqueue(new Uint8Array(v))}catch(m){throw p(m),m}},cancel(h){return p(h),a.return()}},{highWaterMark:2})},Wa=n=>n>=48&&n<=57||n>=65&&n<=70||n>=97&&n<=102,Jb=(n,t,s)=>t+2j>=2&&o.charCodeAt(j-2)===37&&o.charCodeAt(j-1)===51&&(o.charCodeAt(j)===68||o.charCodeAt(j)===100);m>=0&&(o.charCodeAt(m)===61?(h++,m--):v(m)&&(h++,m-=3)),h===1&&m>=0&&(o.charCodeAt(m)===61||v(m))&&h++;const k=Math.floor(d/4)*3-(h||0);return k>0?k:0}let u=0;for(let d=0,p=o.length;d=55296&&h<=56319&&d+1=56320&&m<=57343?(u+=4,d++):u+=3}else u+=3}return u}const pd="1.18.1",pm=64*1024,{isFunction:Ca}=O,e_=n=>encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,s)=>String.fromCharCode(parseInt(s,16))),hm=n=>{if(!O.isString(n))return n;try{return decodeURIComponent(n)}catch{return n}},mm=(n,...t)=>{try{return!!n(...t)}catch{return!1}},t_=n=>{const t=n.indexOf("://");let s=n;return t!==-1&&(s=s.slice(t+3)),s.includes("@")||s.includes(":")},n_=n=>{const t=O.global!==void 0&&O.global!==null?O.global:globalThis,{ReadableStream:s,TextEncoder:o}=t;n=O.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},n);const{fetch:a,Request:u,Response:d}=n,p=a?Ca(a):typeof fetch=="function",h=Ca(u),m=Ca(d);if(!p)return!1;const v=p&&Ca(s),w=p&&(typeof o=="function"?(S=>L=>S.encode(L))(new o):async S=>new Uint8Array(await new u(S).arrayBuffer())),k=h&&v&&mm(()=>{let S=!1;const L=new u(ft.origin,{body:new s,method:"POST",get duplex(){return S=!0,"half"}}),N=L.headers.has("Content-Type");return L.body!=null&&L.body.cancel(),S&&!N}),j=m&&v&&mm(()=>O.isReadableStream(new d("").body)),M={stream:j&&(S=>S.body)};p&&["text","arrayBuffer","blob","formData","stream"].forEach(S=>{!M[S]&&(M[S]=(L,N)=>{let A=L&&L[S];if(A)return A.call(L);throw new X(`Response type '${S}' is not supported`,X.ERR_NOT_SUPPORT,N)})});const _=async S=>{if(S==null)return 0;if(O.isBlob(S))return S.size;if(O.isSpecCompliantForm(S))return(await new u(ft.origin,{method:"POST",body:S}).arrayBuffer()).byteLength;if(O.isArrayBufferView(S)||O.isArrayBuffer(S))return S.byteLength;if(O.isURLSearchParams(S)&&(S=S+""),O.isString(S))return(await w(S)).byteLength},x=async(S,L)=>{const N=O.toFiniteNumber(S.getContentLength());return N??_(L)};return async S=>{let{url:L,method:N,data:A,signal:V,cancelToken:$,timeout:G,onDownloadProgress:z,onUploadProgress:ie,responseType:ue,headers:Ee,withCredentials:Te="same-origin",fetchOptions:xe,maxContentLength:J,maxBodyLength:be}=zy(S);const Se=O.isNumber(J)&&J>-1,_e=O.isNumber(be)&&be>-1,K=Y=>O.hasOwnProp(S,Y)?S[Y]:void 0;let ae=a||fetch;ue=ue?(ue+"").toLowerCase():"text";let U=Kb([V,$&&$.toAbortSignal()],G),P=null;const B=U&&U.unsubscribe&&(()=>{U.unsubscribe()});let ce,me=null;const pe=()=>new X("Request body larger than maxBodyLength limit",X.ERR_BAD_REQUEST,S,P);try{let Y;const ve=K("auth");if(ve){const we=O.getSafeProp(ve,"username")||"",at=O.getSafeProp(ve,"password")||"";Y={username:we,password:at}}if(t_(L)){const we=new URL(L,ft.origin);if(!Y&&(we.username||we.password)){const at=hm(we.username),Jt=hm(we.password);Y={username:at,password:Jt}}(we.username||we.password)&&(we.username="",we.password="",L=we.href)}if(Y&&(Ee.delete("authorization"),Ee.set("Authorization","Basic "+btoa(e_((Y.username||"")+":"+(Y.password||""))))),Se&&typeof L=="string"&&L.startsWith("data:")&&Zb(L)>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,P);if(_e&&N!=="get"&&N!=="head"){const we=await _(A);if(typeof we=="number"&&isFinite(we)&&(ce=we,we>be))throw pe()}const Re=_e&&(O.isReadableStream(A)||O.isStream(A)),ye=(we,at,Jt)=>fm(we,pm,Zt=>{if(_e&&Zt>be)throw me=pe();at&&at(Zt)},Jt);if(k&&N!=="get"&&N!=="head"&&(ie||Re)){if(ce=ce??await x(Ee,A),ce!==0||Re){let we=new u(L,{method:"POST",body:A,duplex:"half"}),at;if(O.isFormData(A)&&(at=we.headers.get("content-type"))&&Ee.setContentType(at),we.body){const[Jt,Zt]=ie&&lm(ce,Va(um(ie)))||[];A=ye(we.body,Jt,Zt)}}}else if(Re&&!h&&v&&N!=="get"&&N!=="head")A=ye(A);else if(Re&&h&&!k&&N!=="get"&&N!=="head")throw new X("Stream request bodies are not supported by the current fetch implementation",X.ERR_NOT_SUPPORT,S,P);O.isString(Te)||(Te=Te?"include":"omit");const tt=h&&"credentials"in u.prototype;if(O.isFormData(A)){const we=Ee.getContentType();we&&/^multipart\/form-data/i.test(we)&&!/boundary=/i.test(we)&&Ee.delete("content-type")}Ee.set("User-Agent","axios/"+pd,!1);const Ft={...xe,signal:U,method:N.toUpperCase(),headers:Py(Ee.normalize()),body:A,duplex:"half",credentials:tt?Te:void 0};P=h&&new u(L,Ft);let it=await(h?ae(P,xe):ae(L,Ft));const Xt=wt.from(it.headers);if(Se){const we=O.toFiniteNumber(Xt.getContentLength());if(we!=null&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,P)}const Mt=j&&(ue==="stream"||ue==="response");if(j&&it.body&&(z||Se||Mt&&B)){const we={};["status","statusText","headers"].forEach(bn=>{we[bn]=it[bn]});const at=O.toFiniteNumber(Xt.getContentLength()),[Jt,Zt]=z&&lm(at,Va(um(z),!0))||[];let Fn=0;const Mn=bn=>{if(Se&&(Fn=bn,Fn>J))throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,P);Jt&&Jt(bn)};it=new d(fm(it.body,pm,Mn,()=>{Zt&&Zt(),B&&B()}),we)}ue=ue||"text";let Ut=await M[O.findKey(M,ue)||"text"](it,S);if(Se&&!j&&!Mt){let we;if(Ut!=null&&(typeof Ut.byteLength=="number"?we=Ut.byteLength:typeof Ut.size=="number"?we=Ut.size:typeof Ut=="string"&&(we=typeof o=="function"?new o().encode(Ut).byteLength:Ut.length)),typeof we=="number"&&we>J)throw new X("maxContentLength size of "+J+" exceeded",X.ERR_BAD_RESPONSE,S,P)}return!Mt&&B&&B(),await new Promise((we,at)=>{Uy(we,at,{data:Ut,headers:wt.from(it.headers),status:it.status,statusText:it.statusText,config:S,request:P})})}catch(Y){if(B&&B(),U&&U.aborted&&U.reason instanceof X){const ve=U.reason;throw ve.config=S,P&&(ve.request=P),Y!==ve&&Object.defineProperty(ve,"cause",{__proto__:null,value:Y,writable:!0,enumerable:!1,configurable:!0}),ve}if(me)throw P&&!me.request&&(me.request=P),me;if(Y instanceof X)throw P&&!Y.request&&(Y.request=P),Y;if(Y&&Y.name==="TypeError"&&/Load failed|fetch/i.test(Y.message)){const ve=new X("Network Error",X.ERR_NETWORK,S,P,Y&&Y.response);throw Object.defineProperty(ve,"cause",{__proto__:null,value:Y.cause||Y,writable:!0,enumerable:!1,configurable:!0}),ve}throw X.from(Y,Y&&Y.code,S,P,Y&&Y.response)}}},r_=new Map,$y=n=>{let t=n&&n.env||{};const{fetch:s,Request:o,Response:a}=t,u=[o,a,s];let d=u.length,p=d,h,m,v=r_;for(;p--;)h=u[p],m=v.get(h),m===void 0&&v.set(h,m=p?new Map:n_(t)),v=m;return m};$y();const hd={http:gb,xhr:Qb,fetch:{get:$y}};O.forEach(hd,(n,t)=>{if(n){try{Object.defineProperty(n,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(n,"adapterName",{__proto__:null,value:t})}});const gm=n=>`- ${n}`,s_=n=>O.isFunction(n)||n===null||n===!1;function o_(n,t){n=O.isArray(n)?n:[n];const{length:s}=n;let o,a;const u={};for(let d=0;d`adapter ${h} `+(m===!1?"is not supported by the environment":"is not available in the build"));let p=s?d.length>1?`since : `+d.map(gm).join(` `):" "+gm(d[0]):"as no adapter specified";throw new X("There is no suitable adapter to dispatch the request "+p,X.ERR_NOT_SUPPORT)}return a}const Vy={getAdapter:o_,adapters:hd};function ec(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new ci(null,n)}function ym(n){return ec(n),n.headers=wt.from(n.headers),n.data=Zu.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),Vy.getAdapter(n.adapter||ui.adapter,n)(n).then(function(o){ec(n),n.response=o;try{o.data=Zu.call(n,n.transformResponse,o)}finally{delete n.response}return o.headers=wt.from(o.headers),o},function(o){if(!My(o)&&(ec(n),o&&o.response)){n.response=o.response;try{o.response.data=Zu.call(n,n.transformResponse,o.response)}finally{delete n.response}o.response.headers=wt.from(o.response.headers)}return Promise.reject(o)})}const Ka={};["object","boolean","number","function","string","symbol"].forEach((n,t)=>{Ka[n]=function(o){return typeof o===n||"a"+(t<1?"n ":" ")+n}});const vm={};Ka.transitional=function(t,s,o){function a(u,d){return"[Axios v"+pd+"] Transitional option '"+u+"'"+d+(o?". "+o:"")}return(u,d,p)=>{if(t===!1)throw new X(a(d," has been removed"+(s?" in "+s:"")),X.ERR_DEPRECATED);return s&&!vm[d]&&(vm[d]=!0,console.warn(a(d," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(u,d,p):!0}};Ka.spelling=function(t){return(s,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function i_(n,t,s){if(typeof n!="object"||n===null)throw new X("options must be an object",X.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let a=o.length;for(;a-- >0;){const u=o[a],d=Object.prototype.hasOwnProperty.call(t,u)?t[u]:void 0;if(d){const p=n[u],h=p===void 0||d(p,u,n);if(h!==!0)throw new X("option "+u+" must be "+h,X.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new X("Unknown option "+u,X.ERR_BAD_OPTION)}}const La={assertOptions:i_,validators:Ka},yt=La.validators;let Qr=class{constructor(t){this.defaults=t||{},this.interceptors={request:new im,response:new im}}async request(t,s){try{return await this._request(t,s)}catch(o){if(o instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const u=(()=>{if(!a.stack)return"";const d=a.stack.indexOf(` `);return d===-1?"":a.stack.slice(d+1)})();try{if(!o.stack)o.stack=u;else if(u){const d=u.indexOf(` `),p=d===-1?-1:u.indexOf(` `,d+1),h=p===-1?"":u.slice(p+1);String(o.stack).endsWith(h)||(o.stack+=` `+u)}}catch{}}throw o}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=Zr(this.defaults,s);const{transitional:o,paramsSerializer:a,headers:u}=s;o!==void 0&&La.assertOptions(o,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean),legacyInterceptorReqResOrdering:yt.transitional(yt.boolean),advertiseZstdAcceptEncoding:yt.transitional(yt.boolean),validateStatusUndefinedResolves:yt.transitional(yt.boolean)},!1),a!=null&&(O.isFunction(a)?s.paramsSerializer={serialize:a}:La.assertOptions(a,{encode:yt.function,serialize:yt.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),La.assertOptions(s,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let d=u&&O.merge(u.common,u[s.method]);u&&O.forEach(["delete","get","head","post","put","patch","query","common"],M=>{delete u[M]}),s.headers=wt.concat(d,u);const p=[];let h=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(s)===!1)return;h=h&&_.synchronous;const x=s.transitional||dd;x&&x.legacyInterceptorReqResOrdering?p.unshift(_.fulfilled,_.rejected):p.push(_.fulfilled,_.rejected)});const m=[];this.interceptors.response.forEach(function(_){m.push(_.fulfilled,_.rejected)});let v,w=0,k;if(!h){const M=[ym.bind(this),void 0];for(M.unshift(...p),M.push(...m),k=M.length,v=Promise.resolve(s);w{if(!o._listeners)return;let u=o._listeners.length;for(;u-- >0;)o._listeners[u](a);o._listeners=null}),this.promise.then=a=>{let u;const d=new Promise(p=>{o.subscribe(p),u=p}).then(a);return d.cancel=function(){o.unsubscribe(u)},d},t(function(u,d,p){o.reason||(o.reason=new ci(u,d,p),s(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=o=>{t.abort(o)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new Wy(function(a){t=a}),cancel:t}}};function l_(n){return function(s){return n.apply(null,s)}}function u_(n){return O.isObject(n)&&n.isAxiosError===!0}const Fc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Fc).forEach(([n,t])=>{Fc[t]=n});function Hy(n){const t=new Qr(n),s=Ey(Qr.prototype.request,t);return O.extend(s,Qr.prototype,t,{allOwnKeys:!0}),O.extend(s,t,null,{allOwnKeys:!0}),s.create=function(a){return Hy(Zr(n,a))},s}const Ke=Hy(ui);Ke.Axios=Qr;Ke.CanceledError=ci;Ke.CancelToken=a_;Ke.isCancel=My;Ke.VERSION=pd;Ke.toFormData=Qa;Ke.AxiosError=X;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=l_;Ke.isAxiosError=u_;Ke.mergeConfig=Zr;Ke.AxiosHeaders=wt;Ke.formToJSON=n=>Fy(O.isHTMLForm(n)?new FormData(n):n);Ke.getAdapter=Vy.getAdapter;Ke.HttpStatusCode=Fc;Ke.default=Ke;const{Axios:YC,AxiosError:XC,CanceledError:JC,isCancel:ZC,CancelToken:eR,VERSION:tR,all:nR,Cancel:rR,isAxiosError:sR,spread:oR,toFormData:iR,AxiosHeaders:aR,HttpStatusCode:lR,formToJSON:uR,getAdapter:cR,mergeConfig:dR,create:fR}=Ke,qy=typeof window>"u",wm=!qy&&window.self!==window.top,c_=!qy&&typeof document>"u",tc=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),ct=[];for(let n=0;n<256;++n)ct.push((n+256).toString(16).slice(1));function d_(n,t=0){return(ct[n[t+0]]+ct[n[t+1]]+ct[n[t+2]]+ct[n[t+3]]+"-"+ct[n[t+4]]+ct[n[t+5]]+"-"+ct[n[t+6]]+ct[n[t+7]]+"-"+ct[n[t+8]]+ct[n[t+9]]+"-"+ct[n[t+10]]+ct[n[t+11]]+ct[n[t+12]]+ct[n[t+13]]+ct[n[t+14]]+ct[n[t+15]]).toLowerCase()}let nc;const f_=new Uint8Array(16);function p_(){if(!nc){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");nc=crypto.getRandomValues.bind(crypto)}return nc(f_)}const h_=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xm={randomUUID:h_};function m_(n,t,s){var a;n=n||{};const o=n.random??((a=n.rng)==null?void 0:a.call(n))??p_();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,d_(o)}function g_(n,t,s){return xm.randomUUID&&!n?xm.randomUUID():m_(n)}const Fo=typeof window<"u"?window:{base44SharedInstances:{}};function y_(n,t){return Fo.base44SharedInstances||(Fo.base44SharedInstances={}),Fo.base44SharedInstances[n]||(Fo.base44SharedInstances[n]={instance:t()}),Fo.base44SharedInstances[n].instance}const v_="__user_heartbeat_event__",w_="__initialization_event__",x_="__session_duration_event__",Em="analytics-enable",Sm="base44_analytics_session_id",E_={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},S_="analytics",Fe=y_(S_,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,config:{...E_,...P_()}})),b_=({axiosClient:n,serverUrl:t,appId:s,userAuthModule:o})=>{var a;const{maxQueueSize:u,throttleTime:d,batchSize:p}=Fe.config;if(!(!((a=Fe.config)===null||a===void 0)&&a.enabled)||c_)return{track:()=>{},cleanup:()=>{}};let h;const m=`${t}/api/apps/${s}/analytics/track/batch`,v=async N=>{await n.request({method:"POST",url:`/apps/${s}/analytics/track/batch`,data:{events:N}})},w=N=>{try{const A=JSON.stringify({events:N}),V=new Blob([A],{type:"application/json"});return typeof navigator>"u"||A.length>6e4||!navigator.sendBeacon(m,V)}catch{return!1}},k=async(N,A={})=>{if(N.length===0)return;const V=await N_(o),$=N.map(T_(V));try{(!A.isBeacon||!w($))&&await v($)}catch{}},j=()=>{_m(k,{throttleTime:d,batchSize:p})},M=N=>{if(Fe.requestsQueue.length>=u)return;const A=R_();Fe.requestsQueue.push({...N,...A}),j()},_=()=>{_m(k,{throttleTime:d,batchSize:p}),h=km(M),k_()},x=()=>{bm(),h==null||h(),C_(M);const N=Fe.requestsQueue.splice(0);k(N,{isBeacon:!0})},S=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&_())},L=()=>{bm(),h==null||h(),typeof window<"u"&&window.removeEventListener("visibilitychange",S)};return j(),h=km(M),__(M),typeof window<"u"&&window.addEventListener("visibilitychange",S),{track:M,cleanup:L}};function bm(){Fe.isProcessing=!1}async function _m(n,t){if(Fe.isProcessing)return;Fe.isProcessing=!0;const{throttleTime:s=1e3,batchSize:o=30}=t??{};for(;Fe.isProcessing&&Fe.requestsQueue.length>0;){const a=Fe.requestsQueue.splice(0,o);a.length&&await n(a),await new Promise(u=>setTimeout(u,s))}Fe.isProcessing=!1}function km(n){var t;if(Fe.isHeartBeatProcessing||((t=Fe.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Fe.isHeartBeatProcessing=!0;const s=setInterval(()=>{n({eventName:v_})},Fe.config.heartBeatInterval);return()=>{clearInterval(s),Fe.isHeartBeatProcessing=!1}}function __(n){typeof window>"u"||Fe.wasInitializationTracked||(Fe.wasInitializationTracked=!0,n({eventName:w_,properties:{referrer:document==null?void 0:document.referrer}}))}function k_(){typeof window>"u"||Fe.sessionStartTime!==null||(Fe.sessionStartTime=new Date().toISOString())}function C_(n){if(typeof window>"u"||Fe.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Fe.sessionStartTime).getTime();Fe.sessionStartTime=null,n({eventName:x_,properties:{sessionDuration:t}})}function R_(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"?window.location.pathname:null}}function T_(n){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...n})}let rc=null;async function N_(n){if(!Fe.sessionContext){if(!rc){const t=md();rc=n.me().then(s=>({user_id:s.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}Fe.sessionContext=await rc}return Fe.sessionContext}function P_(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(Em);if(t==null||!t.length)return;const s=new URLSearchParams(window.location.search);s.delete(Em);const o=window.location.pathname+(s.toString()?"?"+s.toString():"");return window.history.replaceState({},"",o),{enabled:t==="true"}}function md(){if(typeof window>"u")return tc();try{const n=localStorage.getItem(Sm);if(!n){const t=tc();return localStorage.setItem(Sm,t),t}return n}catch{return tc()}}class O_ extends Error{constructor(t,s,o,a,u){super(t),this.name="Base44Error",this.status=s,this.code=o,this.data=a,this.originalError=u}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Bo({baseURL:n,headers:t={},token:s,interceptResponses:o=!0,onError:a}){const u=Ke.create({baseURL:n,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return s&&(u.defaults.headers.common.Authorization=`Bearer ${s}`),u.interceptors.request.use(d=>{typeof window<"u"&&window.location&&(d.headers.set("X-Origin-URL",window.location.href),d.headers.get("Authorization")||d.headers.set("X-Base44-Anonymous-Id",md()));const p=g_();if(d.requestId=p,wm)try{window.parent.postMessage({type:"api-request-start",requestId:p,data:{url:n+d.url,method:d.method,body:d.data instanceof FormData?"[FormData object]":d.data}},"*")}catch{}return d}),o&&u.interceptors.response.use(d=>{var p;const h=(p=d.config)===null||p===void 0?void 0:p.requestId;try{wm&&h&&window.parent.postMessage({type:"api-request-end",requestId:h,data:{statusCode:d.status,response:d.data}},"*")}catch{}return d.data},d=>{var p,h,m,v,w,k,j,M;const _=((h=(p=d.response)===null||p===void 0?void 0:p.data)===null||h===void 0?void 0:h.message)||((v=(m=d.response)===null||m===void 0?void 0:m.data)===null||v===void 0?void 0:v.detail)||d.message,x=new O_(_,(w=d.response)===null||w===void 0?void 0:w.status,(j=(k=d.response)===null||k===void 0?void 0:k.data)===null||j===void 0?void 0:j.code,(M=d.response)===null||M===void 0?void 0:M.data,d);return a==null||a(x),Promise.reject(x)}),u}function Cm(n){const{axios:t,appId:s,getSocket:o}=n;return new Proxy({},{get(a,u){if(!(typeof u!="string"||u==="then"||u.startsWith("_")))return j_(t,s,u,o)}})}function A_(n){var t;try{const s=JSON.parse(n);return{type:s.type,data:s.data,id:s.id||((t=s.data)===null||t===void 0?void 0:t.id),timestamp:s.timestamp||new Date().toISOString()}}catch(s){return console.warn("[Base44 SDK] Failed to parse realtime message:",s),null}}function j_(n,t,s,o){const a=`/apps/${t}/entities/${s}`;return{async list(u,d,p,h){const m={};return u&&(m.sort=u),d&&(m.limit=d),p&&(m.skip=p),h&&(m.fields=Array.isArray(h)?h.join(","):h),n.get(a,{params:m})},async filter(u,d,p,h,m){const v={q:JSON.stringify(u)};return d&&(v.sort=d),p&&(v.limit=p),h&&(v.skip=h),m&&(v.fields=Array.isArray(m)?m.join(","):m),n.get(a,{params:v})},async get(u){return n.get(`${a}/${u}`)},async create(u){return n.post(a,u)},async update(u,d){return n.put(`${a}/${u}`,d)},async delete(u){return n.delete(`${a}/${u}`)},async deleteMany(u){return n.delete(a,{data:u})},async bulkCreate(u){return n.post(`${a}/bulk`,u)},async updateMany(u,d){return n.patch(`${a}/update-many`,{query:u,data:d})},async bulkUpdate(u){return n.put(`${a}/bulk`,u)},async importEntities(u){const d=new FormData;return d.append("file",u,u.name),n.post(`${a}/import`,d,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(u){const d=`entities:${t}:${s}`;return o().subscribeToRoom(d,{update_model:m=>{var v;const w=A_(m.data);if(w){w.type!=="delete"&&(!((v=w.data)===null||v===void 0)&&v._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${s}#${w.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${s}.get("${w.id}")\` to fetch the full record.`);try{u(w)}catch(k){console.error("[Base44 SDK] Subscription callback error:",k)}}}})}}}function L_(n,t){return{async call(s,o,a){if(!(s!=null&&s.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(o!=null&&o.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:u,queryParams:d,...p}=a??{},h={...p,...u&&{path_params:u},...d&&{query_params:d}};return await n.post(`/apps/${t}/integrations/custom/${s}/${o}`,h)}}}function Rm(n,t){const s=L_(n,t);return new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?s:new Proxy({},{get(u,d){if(!(typeof d!="string"||d==="then"||d.startsWith("_")))return async p=>{if(typeof p=="string")throw new Error(`Integration ${d} must receive an object with named parameters, received: ${p}`);let h,m;return p instanceof FormData||p&&Object.values(p).some(v=>v instanceof File)?(h=new FormData,Object.keys(p).forEach(v=>{p[v]instanceof File?h.append(v,p[v],p[v].name):typeof p[v]=="object"&&p[v]!==null?h.append(v,JSON.stringify(p[v])):h.append(v,p[v])}),m="multipart/form-data"):(h=p,m="application/json"),a==="Core"?n.post(`/apps/${t}/integration-endpoints/Core/${d}`,h||p,{headers:{"Content-Type":m}}):n.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${d}`,h||p,{headers:{"Content-Type":m}})}}})}})}function I_(){return typeof window>"u"?!1:window!==window.parent}function D_(n,t,s){const u=Math.round(window.screenX+(window.outerWidth-500)/2),d=Math.round(window.screenY+(window.outerHeight-600)/2),p=window.open(n,"base44_auth",`width=500,height=600,left=${u},top=${d},resizable=yes,scrollbars=yes`);if(!p)return;const h=()=>{window.removeEventListener("message",m),clearInterval(v),p.closed||p.close()},m=w=>{var k;if(w.origin!==s||w.source!==p||!(!((k=w.data)===null||k===void 0)&&k.access_token))return;h();const j=new URL(t),{access_token:M,is_new_user:_}=w.data;j.searchParams.set("access_token",M),_!=null&&j.searchParams.set("is_new_user",String(_)),window.location.href=j.toString()},v=setInterval(()=>{p.closed&&h()},500);window.addEventListener("message",m)}function F_(n,t,s,o){return{async me(){return n.get(`/apps/${s}/entities/User/me`)},async updateMe(a){return n.put(`/apps/${s}/entities/User/me`,a)},redirectToLogin(a){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const u=a?new URL(a,window.location.origin).toString():window.location.href,d=`${o.appBaseUrl}/login?from_url=${encodeURIComponent(u)}`;window.location.href=d},loginWithProvider(a,u="/"){const d=new URL(u,window.location.origin).toString(),p=`app_id=${s}&from_url=${encodeURIComponent(d)}`;let h;a==="sso"?h=`/apps/${s}/auth/sso/login`:h=`/apps/auth${a==="google"?"":`/${a}`}/login`;const m=`${o.appBaseUrl}/api${h}?${p}`;if(I_()){const v=`${m}&popup_origin=${encodeURIComponent(window.location.origin)}`;return D_(v,d,window.location.origin)}window.location.href=m},logout(a){if(delete n.defaults.headers.common.Authorization,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(p){console.error("Failed to remove token from localStorage:",p)}const u=a||window.location.href,d=`${o.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(u)}`;window.location.href=d}},setToken(a,u=!0){if(a&&(n.defaults.headers.common.Authorization=`Bearer ${a}`,t.defaults.headers.common.Authorization=`Bearer ${a}`,u&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",a),window.localStorage.setItem("token",a)}catch(d){console.error("Failed to save token to localStorage:",d)}},async loginViaEmailPassword(a,u,d){var p;try{const h=await n.post(`/apps/${s}/auth/login`,{email:a,password:u,...d&&{turnstile_token:d}}),{access_token:m,user:v}=h;return m&&this.setToken(m),{access_token:m,user:v}}catch(h){throw((p=h.response)===null||p===void 0?void 0:p.status)===401&&await this.logout(),h}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(a,u){return n.post(`/apps/${s}/users/invite-user`,{user_email:a,role:u})},register(a){return n.post(`/apps/${s}/auth/register`,a)},verifyOtp({email:a,otpCode:u}){return n.post(`/apps/${s}/auth/verify-otp`,{email:a,otp_code:u})},resendOtp(a){return n.post(`/apps/${s}/auth/resend-otp`,{email:a})},resetPasswordRequest(a){return n.post(`/apps/${s}/auth/reset-password-request`,{email:a})},resetPassword({resetToken:a,newPassword:u}){return n.post(`/apps/${s}/auth/reset-password`,{reset_token:a,new_password:u})},changePassword({userId:a,currentPassword:u,newPassword:d}){return n.post(`/apps/${s}/auth/change-password`,{user_id:a,current_password:u,new_password:d})}}}function M_(n,t){return{async getAccessToken(s){const o=`/apps/${t}/auth/sso/accesstoken/${s}`;return n.get(o)},async getIdToken(s){const o=`/apps/${t}/auth/sso/idtoken/${s}`;return n.get(o)}}}function U_(n,t){return{async getAccessToken(s){if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");return(await n.get(`/apps/${t}/external-auth/tokens/${s}`)).access_token},async getConnection(s){var o;if(!s||typeof s!="string")throw new Error("Integration type is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getWorkspaceConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/external-auth/tokens/connectors/${s}`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}},async getCurrentAppUserAccessToken(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`)).access_token},async getCurrentAppUserConnection(s){var o;if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");const u=await n.get(`/apps/${t}/app-user-auth/connectors/${s}/token`);return{accessToken:u.access_token,connectionConfig:(o=u.connection_config)!==null&&o!==void 0?o:null}}}}function B_(n,t){return{async connectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");return(await n.post(`/apps/${t}/app-user-auth/connectors/${s}/initiate`)).redirect_url},async disconnectAppUser(s){if(!s||typeof s!="string")throw new Error("Connector ID is required and must be a string");await n.delete(`/apps/${t}/app-user-auth/connectors/${s}`)}}}function Kr(n={}){const{storageKey:t="base44_access_token",paramName:s="access_token",saveToStorage:o=!0,removeFromUrl:a=!0}=n;let u=null;if(typeof window<"u"&&window.location)try{const d=new URLSearchParams(window.location.search);if(u=d.get(s),u){if(o&&z_(u,{storageKey:t}),a){d.delete(s);const p=`${window.location.pathname}${d.toString()?`?${d.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,p)}return u}}catch(d){console.error("Error retrieving token from URL:",d)}if(typeof window<"u"&&window.localStorage)try{return u=window.localStorage.getItem(t),u}catch(d){console.error("Error retrieving token from local storage:",d)}return null}function z_(n,t){const{storageKey:s="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!n)return!1;try{return window.localStorage.setItem(s,n),window.localStorage.setItem("token",n),!0}catch(o){return console.error("Error saving token to local storage:",o),!1}}function Tm(n,t,s){const o=(u,d)=>u?`${String(u).replace(/\/$/,"")}${d}`:d,a=u=>{const d=new Headers;if(s!=null&&s.getAuthHeaders){const p=s.getAuthHeaders();Object.entries(p).forEach(([h,m])=>{m!=null&&d.set(h,String(m))})}return u&&new Headers(u).forEach((p,h)=>{d.set(h,p)}),d};return{async invoke(u,d){if(typeof d=="string")throw new Error(`Function ${u} must receive an object with named parameters, received: ${d}`);let p,h;return d instanceof FormData||d&&Object.values(d).some(m=>m instanceof File)?(p=new FormData,Object.keys(d).forEach(m=>{d[m]instanceof File?p.append(m,d[m],d[m].name):typeof d[m]=="object"&&d[m]!==null?p.append(m,JSON.stringify(d[m])):p.append(m,d[m])}),h="multipart/form-data"):(p=d,h="application/json"),n.post(`/apps/${t}/functions/${u}`,p||d,{headers:{"Content-Type":h}})},async fetch(u,d={}){const h=`/functions${u.startsWith("/")?u:`/${u}`}`,m=a(d.headers),v={...d,headers:m};return await fetch(o(s==null?void 0:s.baseURL,h),v)}}}function Nm({axios:n,getSocket:t,appId:s,serverUrl:o,token:a}){const u=`/apps/${s}/agents`,d={},p=()=>n.get(`${u}/conversations`),h=_=>n.get(`${u}/conversations/${_}`);return{getConversations:p,getConversation:h,listConversations:_=>n.get(`${u}/conversations`,{params:_}),createConversation:_=>n.post(`${u}/conversations`,_),addMessage:async(_,x)=>n.post(`${u}/conversations/v2/${_.id}/messages`,x),subscribeToConversation:(_,x)=>{const S=`/agent-conversations/${_}`,L=t(),N=h(_).then(A=>(d[_]=A,A));return L.subscribeToRoom(S,{connect:()=>{},update_model:async({data:A})=>{const V=JSON.parse(A);if(V._message){await N;const $=V._message,G=d[_];if(G){const z=G.messages||[],ie=z.findIndex(Ee=>Ee.id===$.id),ue=ie!==-1?z.map((Ee,Te)=>Te===ie?$:Ee):[...z,$];d[_]={...G,messages:ue},x==null||x(d[_])}}}})},getWhatsAppConnectURL:_=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(_)}/whatsapp`,S=a??Kr();return S?`${x}?token=${S}`:x},getTelegramConnectURL:_=>{const x=`${o}/api/apps/${s}/agents/${encodeURIComponent(_)}/telegram`,S=a??Kr();return S?`${x}?token=${S}`:x}}}function Pm({serverUrl:n,token:t,appId:s}){return{connection:()=>{var a;return{baseURL:`${n}/api/apps/${s}/ai/openai/v1`,token:(a=t??Kr())!==null&&a!==void 0?a:""}}}}function Om(n,t){const s=`/app-logs/${t}`;return{async logUserInApp(o){await n.post(`${s}/log-user-in-app/${o}`)},async fetchLogs(o={}){return await n.get(s,{params:o})},async getStats(o={}){return await n.get(`${s}/stats`,{params:o})}}}function $_(n,t){return{async inviteUser(s,o){if(o!=="user"&&o!=="admin")throw new Error(`Invalid role: "${o}". Role must be either "user" or "admin".`);return await n.post(`/apps/${t}/runtime/users/invite-user`,{user_email:s,role:o})}}}const En=Object.create(null);En.open="0";En.close="1";En.ping="2";En.pong="3";En.message="4";En.upgrade="5";En.noop="6";const Ia=Object.create(null);Object.keys(En).forEach(n=>{Ia[En[n]]=n});const Mc={type:"error",data:"parser error"},Qy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ky=typeof ArrayBuffer=="function",Gy=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,gd=({type:n,data:t},s,o)=>Qy&&t instanceof Blob?s?o(t):Am(t,o):Ky&&(t instanceof ArrayBuffer||Gy(t))?s?o(t):Am(new Blob([t]),o):o(En[n]+(t||"")),Am=(n,t)=>{const s=new FileReader;return s.onload=function(){const o=s.result.split(",")[1];t("b"+(o||""))},s.readAsDataURL(n)};function jm(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let sc;function V_(n,t){if(Qy&&n.data instanceof Blob)return n.data.arrayBuffer().then(jm).then(t);if(Ky&&(n.data instanceof ArrayBuffer||Gy(n.data)))return t(jm(n.data));gd(n,!1,s=>{sc||(sc=new TextEncoder),t(sc.encode(s))})}const Lm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n{let t=n.length*.75,s=n.length,o,a=0,u,d,p,h;n[n.length-1]==="="&&(t--,n[n.length-2]==="="&&t--);const m=new ArrayBuffer(t),v=new Uint8Array(m);for(o=0;o>4,v[a++]=(d&15)<<4|p>>2,v[a++]=(p&3)<<6|h&63;return m},H_=typeof ArrayBuffer=="function",yd=(n,t)=>{if(typeof n!="string")return{type:"message",data:Yy(n,t)};const s=n.charAt(0);return s==="b"?{type:"message",data:q_(n.substring(1),t)}:Ia[s]?n.length>1?{type:Ia[s],data:n.substring(1)}:{type:Ia[s]}:Mc},q_=(n,t)=>{if(H_){const s=W_(n);return Yy(s,t)}else return{base64:!0,data:n}},Yy=(n,t)=>{switch(t){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Xy="",Q_=(n,t)=>{const s=n.length,o=new Array(s);let a=0;n.forEach((u,d)=>{gd(u,!1,p=>{o[d]=p,++a===s&&t(o.join(Xy))})})},K_=(n,t)=>{const s=n.split(Xy),o=[];for(let a=0;a{const o=s.length;let a;if(o<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,o);else if(o<65536){a=new Uint8Array(3);const u=new DataView(a.buffer);u.setUint8(0,126),u.setUint16(1,o)}else{a=new Uint8Array(9);const u=new DataView(a.buffer);u.setUint8(0,127),u.setBigUint64(1,BigInt(o))}n.data&&typeof n.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(s)})}})}let oc;function Ra(n){return n.reduce((t,s)=>t+s.length,0)}function Ta(n,t){if(n[0].length===t)return n.shift();const s=new Uint8Array(t);let o=0;for(let a=0;aMath.pow(2,21)-1){p.enqueue(Mc);break}a=v*Math.pow(2,32)+m.getUint32(4),o=3}else{if(Ra(s)n){p.enqueue(Mc);break}}}})}const Jy=4;function Ye(n){if(n)return X_(n)}function X_(n){for(var t in Ye.prototype)n[t]=Ye.prototype[t];return n}Ye.prototype.on=Ye.prototype.addEventListener=function(n,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(t),this};Ye.prototype.once=function(n,t){function s(){this.off(n,s),t.apply(this,arguments)}return s.fn=t,this.on(n,s),this};Ye.prototype.off=Ye.prototype.removeListener=Ye.prototype.removeAllListeners=Ye.prototype.removeEventListener=function(n,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var s=this._callbacks["$"+n];if(!s)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,a=0;aPromise.resolve().then(t):(t,s)=>s(t,0),Gt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),J_="arraybuffer";function Zy(n,...t){return t.reduce((s,o)=>(n.hasOwnProperty(o)&&(s[o]=n[o]),s),{})}const Z_=Gt.setTimeout,ek=Gt.clearTimeout;function Ya(n,t){t.useNativeTimers?(n.setTimeoutFn=Z_.bind(Gt),n.clearTimeoutFn=ek.bind(Gt)):(n.setTimeoutFn=Gt.setTimeout.bind(Gt),n.clearTimeoutFn=Gt.clearTimeout.bind(Gt))}const tk=1.33;function nk(n){return typeof n=="string"?rk(n):Math.ceil((n.byteLength||n.size)*tk)}function rk(n){let t=0,s=0;for(let o=0,a=n.length;o=57344?s+=3:(o++,s+=4);return s}function ev(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sk(n){let t="";for(let s in n)n.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(n[s]));return t}function ok(n){let t={},s=n.split("&");for(let o=0,a=s.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||s()})),this.writable||(o++,this.once("drain",function(){--o||s()}))}else s()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const s=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};K_(t,this.socket.binaryType).forEach(s),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Q_(t,s=>{this.doWrite(s,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",s=this.query||{};return this.opts.timestampRequests!==!1&&(s[this.opts.timestampParam]=ev()),!this.supportsBinary&&!s.sid&&(s.b64=1),this.createUri(t,s)}}let tv=!1;try{tv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const lk=tv;function uk(){}class ck extends ak{constructor(t){if(super(t),typeof location<"u"){const s=location.protocol==="https:";let o=location.port;o||(o=s?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,s){const o=this.request({method:"POST",data:t});o.on("success",s),o.on("error",(a,u)=>{this.onError("xhr post error",a,u)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(s,o)=>{this.onError("xhr poll error",s,o)}),this.pollXhr=t}}class xn extends Ye{constructor(t,s,o){super(),this.createRequest=t,Ya(this,o),this._opts=o,this._method=o.method||"GET",this._uri=s,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;const s=Zy(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(s);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&o.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var a;o.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=xn.requestsCount++,xn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=uk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete xn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}xn.requestsCount=0;xn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Im);else if(typeof addEventListener=="function"){const n="onpagehide"in Gt?"pagehide":"unload";addEventListener(n,Im,!1)}}function Im(){for(let n in xn.requests)xn.requests.hasOwnProperty(n)&&xn.requests[n].abort()}const dk=(function(){const n=nv({xdomain:!1});return n&&n.responseType!==null})();class fk extends ck{constructor(t){super(t);const s=t&&t.forceBase64;this.supportsBinary=dk&&!s}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xn(nv,this.uri(),t)}}function nv(n){const t=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||lk))return new XMLHttpRequest}catch{}if(!t)try{return new Gt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const rv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pk extends vd{get name(){return"websocket"}doOpen(){const t=this.uri(),s=this.opts.protocols,o=rv?{}:Zy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,s,o)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let s=0;s{try{this.doWrite(o,u)}catch{}a&&Ga(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",s=this.query||{};return this.opts.timestampRequests&&(s[this.opts.timestampParam]=ev()),this.supportsBinary||(s.b64=1),this.createUri(t,s)}}const ic=Gt.WebSocket||Gt.MozWebSocket;class hk extends pk{createSocket(t,s,o){return rv?new ic(t,s,o):s?new ic(t,s):new ic(t)}doWrite(t,s){this.ws.send(s)}}class mk extends vd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const s=Y_(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(s).getReader(),a=G_();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const u=()=>{o.read().then(({done:p,value:h})=>{p||(this.onPacket(h),u())}).catch(p=>{})};u();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let s=0;s{a&&Ga(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const gk={websocket:hk,webtransport:mk,polling:fk},yk=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,vk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uc(n){if(n.length>8e3)throw"URI too long";const t=n,s=n.indexOf("["),o=n.indexOf("]");s!=-1&&o!=-1&&(n=n.substring(0,s)+n.substring(s,o).replace(/:/g,";")+n.substring(o,n.length));let a=yk.exec(n||""),u={},d=14;for(;d--;)u[vk[d]]=a[d]||"";return s!=-1&&o!=-1&&(u.source=t,u.host=u.host.substring(1,u.host.length-1).replace(/;/g,":"),u.authority=u.authority.replace("[","").replace("]","").replace(/;/g,":"),u.ipv6uri=!0),u.pathNames=wk(u,u.path),u.queryKey=xk(u,u.query),u}function wk(n,t){const s=/\/{2,9}/g,o=t.replace(s,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function xk(n,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,a,u){a&&(s[a]=u)}),s}const Bc=typeof addEventListener=="function"&&typeof removeEventListener=="function",Da=[];Bc&&addEventListener("offline",()=>{Da.forEach(n=>n())},!1);class vr extends Ye{constructor(t,s){if(super(),this.binaryType=J_,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){const o=Uc(t);s.hostname=o.host,s.secure=o.protocol==="https"||o.protocol==="wss",s.port=o.port,o.query&&(s.query=o.query)}else s.host&&(s.hostname=Uc(s.host).host);Ya(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(o=>{const a=o.prototype.name;this.transports.push(a),this._transportsByName[a]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ok(this.opts.query)),Bc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Da.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const s=Object.assign({},this.opts.query);s.EIO=Jy,s.transport=t,this.id&&(s.sid=this.id);const o=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&vr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",vr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let o=0;o0&&s>this._maxPayload)return this.writeBuffer.slice(0,o);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Ga(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,o){return this._sendPacket("message",t,s,o),this}send(t,s,o){return this._sendPacket("message",t,s,o),this}_sendPacket(t,s,o,a){if(typeof s=="function"&&(a=s,s=void 0),typeof o=="function"&&(a=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const u={type:t,data:s,options:o};this.emitReserved("packetCreate",u),this.writeBuffer.push(u),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},o=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(vr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Bc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Da.indexOf(this._offlineEventListener);o!==-1&&Da.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}vr.protocol=Jy;class Ek extends vr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(s.send([{type:"ping",data:"probe"}]),s.once("packet",w=>{if(!o)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",s),!s)return;vr.priorWebsocketSuccess=s.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(v(),this.setTransport(s),s.send([{type:"upgrade"}]),this.emitReserved("upgrade",s),s=null,this.upgrading=!1,this.flush())})}else{const k=new Error("probe error");k.transport=s.name,this.emitReserved("upgradeError",k)}}))};function u(){o||(o=!0,v(),s.close(),s=null)}const d=w=>{const k=new Error("probe error: "+w);k.transport=s.name,u(),this.emitReserved("upgradeError",k)};function p(){d("transport closed")}function h(){d("socket closed")}function m(w){s&&w.name!==s.name&&u()}const v=()=>{s.removeListener("open",a),s.removeListener("error",d),s.removeListener("close",p),this.off("close",h),this.off("upgrading",m)};s.once("open",a),s.once("error",d),s.once("close",p),this.once("close",h),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||s.open()},200):s.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const s=[];for(let o=0;ogk[u]).filter(u=>!!u)),super(o?a:t,a)}};function bk(n,t="",s){let o=n;s=s||typeof location<"u"&&location,n==null&&(n=s.protocol+"//"+s.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=s.protocol+n:n=s.host+n),/^(https?|wss?):\/\//.test(n)||(typeof s<"u"?n=s.protocol+"//"+n:n="https://"+n),o=Uc(n)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const u=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+u+":"+o.port+t,o.href=o.protocol+"://"+u+(s&&s.port===o.port?"":":"+o.port),o}const _k=typeof ArrayBuffer=="function",kk=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,sv=Object.prototype.toString,Ck=typeof Blob=="function"||typeof Blob<"u"&&sv.call(Blob)==="[object BlobConstructor]",Rk=typeof File=="function"||typeof File<"u"&&sv.call(File)==="[object FileConstructor]";function wd(n){return _k&&(n instanceof ArrayBuffer||kk(n))||Ck&&n instanceof Blob||Rk&&n instanceof File}function Fa(n,t){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let s=0,o=n.length;s=0&&n.numthis.opts.maxAttachments)throw new Error("too many attachments");o.attachments=p}if(t.charAt(s+1)==="/"){const u=s+1;for(;++s&&!(t.charAt(s)===","||s===t.length););o.nsp=t.substring(u,s)}else o.nsp="/";const a=t.charAt(s+1);if(a!==""&&Number(a)==a){const u=s+1;for(;++s;){const d=t.charAt(s);if(d==null||Number(d)!=d){--s;break}if(s===t.length)break}o.id=Number(t.substring(u,s+1))}if(t.charAt(++s)){const u=this.tryParse(t.substr(s));if(xd.isPayloadValid(o.type,u))o.data=u;else throw new Error("invalid payload")}return o}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,s){switch(t){case Oe.CONNECT:return Dm(s);case Oe.DISCONNECT:return s===void 0;case Oe.CONNECT_ERROR:return typeof s=="string"||Dm(s);case Oe.EVENT:case Oe.BINARY_EVENT:return Array.isArray(s)&&(typeof s[0]=="number"||typeof s[0]=="string"&&Pk.indexOf(s[0])===-1);case Oe.ACK:case Oe.BINARY_ACK:return Array.isArray(s)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Ak{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const s=Nk(this.reconPack,this.buffers);return this.finishedReconstruction(),s}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const jk=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function Dm(n){return Object.prototype.toString.call(n)==="[object Object]"}const Lk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:xd,Encoder:Ok,get PacketType(){return Oe}},Symbol.toStringTag,{value:"Module"}));function cn(n,t,s){return n.on(t,s),function(){n.off(t,s)}}const Ik=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ov extends Ye{constructor(t,s,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=s,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[cn(t,"open",this.onopen.bind(this)),cn(t,"packet",this.onpacket.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...s){var o,a,u;if(Ik.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(s.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(s),this;const d={type:Oe.EVENT,data:s};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof s[s.length-1]=="function"){const v=this.ids++,w=s.pop();this._registerAckCallback(v,w),d.id=v}const p=(a=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||a===void 0?void 0:a.writable,h=this.connected&&!(!((u=this.io.engine)===null||u===void 0)&&u._hasPingExpired());return this.flags.volatile&&!p||(h?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(t,s){var o;const a=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(a===void 0){this.acks[t]=s;return}const u=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let p=0;p{this.io.clearTimeoutFn(u),s.apply(this,p)};d.withError=!0,this.acks[t]=d}emitWithAck(t,...s){return new Promise((o,a)=>{const u=(d,p)=>d?a(d):o(p);u.withError=!0,s.push(u),this.emit(t,...s)})}_addToQueue(t){let s;typeof t[t.length-1]=="function"&&(s=t.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...u)=>(this._queue[0],a!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),s&&s(a)):(this._queue.shift(),s&&s(null,...u)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const s=this._queue[0];s.pending&&!t||(s.pending=!0,s.tryCount++,this.flags=s.flags,this.emit.apply(this,s.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Oe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,s){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,s),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){const o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Oe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Oe.EVENT:case Oe.BINARY_EVENT:this.onevent(t);break;case Oe.ACK:case Oe.BINARY_ACK:this.onack(t);break;case Oe.DISCONNECT:this.ondisconnect();break;case Oe.CONNECT_ERROR:this.destroy();const o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){const s=t.data||[];t.id!=null&&s.push(this.ack(t.id)),this.connected?this.emitEvent(s):this.receiveBuffer.push(Object.freeze(s))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const s=this._anyListeners.slice();for(const o of s)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const s=this;let o=!1;return function(...a){o||(o=!0,s.packet({type:Oe.ACK,id:t,data:a}))}}onack(t){const s=this.acks[t.id];typeof s=="function"&&(delete this.acks[t.id],s.withError&&t.data.unshift(null),s.apply(this,t.data))}onconnect(t,s){this.id=t,this.recovered=s&&this._pid===s,this._pid=s,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Oe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const s=this._anyListeners;for(let o=0;o0&&n.jitter<=1?n.jitter:0,this.attempts=0}Ks.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*n);n=(Math.floor(t*10)&1)==0?n-s:n+s}return Math.min(n,this.max)|0};Ks.prototype.reset=function(){this.attempts=0};Ks.prototype.setMin=function(n){this.ms=n};Ks.prototype.setMax=function(n){this.max=n};Ks.prototype.setJitter=function(n){this.jitter=n};class Vc extends Ye{constructor(t,s){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(s=t,t=void 0),s=s||{},s.path=s.path||"/socket.io",this.opts=s,Ya(this,s),this.reconnection(s.reconnection!==!1),this.reconnectionAttempts(s.reconnectionAttempts||1/0),this.reconnectionDelay(s.reconnectionDelay||1e3),this.reconnectionDelayMax(s.reconnectionDelayMax||5e3),this.randomizationFactor((o=s.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Ks({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(s.timeout==null?2e4:s.timeout),this._readyState="closed",this.uri=t;const a=s.parser||Lk;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=s.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var s;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(s=this.backoff)===null||s===void 0||s.setMin(t),this)}randomizationFactor(t){var s;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(s=this.backoff)===null||s===void 0||s.setJitter(t),this)}reconnectionDelayMax(t){var s;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(s=this.backoff)===null||s===void 0||s.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Sk(this.uri,this.opts);const s=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const a=cn(s,"open",function(){o.onopen(),t&&t()}),u=p=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",p),t?t(p):this.maybeReconnectOnOpen()},d=cn(s,"error",u);if(this._timeout!==!1){const p=this._timeout,h=this.setTimeoutFn(()=>{a(),u(new Error("timeout")),s.close()},p);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(a),this.subs.push(d),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(cn(t,"ping",this.onping.bind(this)),cn(t,"data",this.ondata.bind(this)),cn(t,"error",this.onerror.bind(this)),cn(t,"close",this.onclose.bind(this)),cn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(s){this.onclose("parse error",s)}}ondecoded(t){Ga(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,s){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new ov(this,t,s),this.nsps[t]=o),o}_destroy(t){const s=Object.keys(this.nsps);for(const o of s)if(this.nsps[o].active)return;this._close()}_packet(t){const s=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,s){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,s),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const s=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Mo={};function Ma(n,t){typeof n=="object"&&(t=n,n=void 0),t=t||{};const s=bk(n,t.path||"/socket.io"),o=s.source,a=s.id,u=s.path,d=Mo[a]&&u in Mo[a].nsps,p=t.forceNew||t["force new connection"]||t.multiplex===!1||d;let h;return p?h=new Vc(o,t):(Mo[a]||(Mo[a]=new Vc(o,t)),h=Mo[a]),s.query&&!t.query&&(t.query=s.queryKey),h.socket(s.path,t)}Object.assign(Ma,{Manager:Vc,Socket:ov,io:Ma,connect:Ma});const Dk=250;function Fm(n,t){var s;const o=(s=n.token)!==null&&s!==void 0?s:Kr(),a={app_id:n.appId,token:o};o||(a.anonymous_id=md());const u=Ma(n.serverUrl,{path:n.mountPath,transports:n.transports,query:a});return u.on("connect",async()=>{var d;return console.log("connect",u.id),(d=t.connect)===null||d===void 0?void 0:d.call(t)}),u.on("update_model",async d=>{var p;return(p=t.update_model)===null||p===void 0?void 0:p.call(t,d)}),u.on("error",async d=>{var p;return(p=t.error)===null||p===void 0?void 0:p.call(t,d)}),u.on("connect_error",async d=>{var p;return console.error("connect_error",d),(p=t.error)===null||p===void 0?void 0:p.call(t,d)}),u}function Fk({config:n}){let t={...n};const s={},o={},a={connect:async()=>{const S=[];Object.keys(s).forEach(L=>{const N=k(L);N.length!==0&&(m(L),N.forEach(({connect:A})=>{const V=async()=>A==null?void 0:A();S.push(V())}))}),await Promise.all(S)},update_model:async S=>{const N=k(S.room).map(A=>{var V;return(V=A.update_model)===null||V===void 0?void 0:V.call(A,S)});await Promise.all(N)},error:async S=>{console.error("error",S);const L=Object.values(s).flat().map(N=>{var A;return(A=N.error)===null||A===void 0?void 0:A.call(N,S)});await Promise.all(L)}};let u=Fm(n,a);function d(){p()}function p(){M(),u&&u.disconnect()}function h(S){d(),t={...t,...S},u=Fm(t,a)}function m(S){u.emit("join",S)}function v(S){u.emit("leave",S)}async function w(S,L){var N;const A=JSON.stringify(L);return(N=a.update_model)===null||N===void 0?void 0:N.call(a,{room:S,data:A})}function k(S){var L;return(L=s[S])!==null&&L!==void 0?L:[]}function j(S){const L=o[S];L&&(clearTimeout(L),delete o[S])}function M(){Object.keys(o).forEach(S=>{var L,N;clearTimeout(o[S]),delete o[S],((N=(L=s[S])===null||L===void 0?void 0:L.length)!==null&&N!==void 0?N:0)===0&&delete s[S]})}function _(S){j(S),o[S]=setTimeout(()=>{var L,N;delete o[S],!(((N=(L=s[S])===null||L===void 0?void 0:L.length)!==null&&N!==void 0?N:0)>0)&&(v(S),delete s[S])},Dk)}return{socket:u,subscribeToRoom:(S,L)=>{s[S]?j(S):(m(S),s[S]=[]),s[S].push(L);let N=!1;return()=>{var A,V;N||(N=!0,s[S]=(V=(A=s[S])===null||A===void 0?void 0:A.filter($=>$!==L))!==null&&V!==void 0?V:[],s[S].length===0&&_(S))}},updateConfig:h,updateModel:w,disconnect:p}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: \`\`\` import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. `);var iv=class extends Event{constructor(t,s){super("error",s);Le(this,"message");Le(this,"error");this.message=t.message,this.error=t}},av=class extends Event{constructor(t=1e3,s="",o){super("close",o);Le(this,"code");Le(this,"reason");Le(this,"wasClean",!0);this.code=t,this.reason=s}},ac={Event,ErrorEvent:iv,CloseEvent:av};function Mk(n,t){if(!n)throw new Error(t)}function Uk(n){return new n.constructor(n.type,n)}function Bk(n){return"data"in n?new MessageEvent(n.type,n):"code"in n||"reason"in n?new av(n.code||1999,n.reason||"unknown reason",n):"error"in n?new iv(n.error,n):new Event(n.type,n)}var eg,zk=typeof process<"u"&&typeof((eg=process.versions)==null?void 0:eg.node)<"u"&&typeof document>"u",Na=zk?Bk:Uk,Lr={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},Mm=!1,$k=class Ir extends EventTarget{constructor(s,o,a={}){super();Le(this,"_ws");Le(this,"_retryCount",-1);Le(this,"_uptimeTimeout");Le(this,"_connectTimeout");Le(this,"_shouldReconnect",!0);Le(this,"_connectLock",!1);Le(this,"_binaryType","blob");Le(this,"_closeCalled",!1);Le(this,"_messageQueue",[]);Le(this,"_url");Le(this,"_protocols");Le(this,"_options");Le(this,"onclose",null);Le(this,"onerror",null);Le(this,"onmessage",null);Le(this,"onopen",null);Le(this,"_handleOpen",s=>{this._debug("open event");const{minUptime:o=Lr.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),o),Mk(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var u;return(u=this._ws)==null?void 0:u.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(s),this.dispatchEvent(Na(s))});Le(this,"_handleMessage",s=>{this._debug("message event"),this.onmessage&&this.onmessage(s),this.dispatchEvent(Na(s))});Le(this,"_handleError",s=>{this._debug("error event",s.message),this._disconnect(void 0,s.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(s),this._debug("exec error listeners"),this.dispatchEvent(Na(s)),this._connect()});Le(this,"_handleClose",s=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(s),this.dispatchEvent(Na(s))});this._url=s,this._protocols=o,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Ir.CONNECTING}get OPEN(){return Ir.OPEN}get CLOSING(){return Ir.CLOSING}get CLOSED(){return Ir.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(s){this._binaryType=s,this._ws&&(this._ws.binaryType=s)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((o,a)=>(typeof a=="string"?o+=a.length:a instanceof Blob?o+=a.size:o+=a.byteLength,o),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Ir.CLOSED:Ir.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(s=1e3,o){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(s,o)}reconnect(s,o){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(s,o),this._connect())}send(s){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",s),this._ws.send(s);else{const{maxEnqueuedMessages:o=Lr.maxEnqueuedMessages}=this._options;this._messageQueue.length",...s])}_getNextDelay(){const{reconnectionDelayGrowFactor:s=Lr.reconnectionDelayGrowFactor,minReconnectionDelay:o=Lr.minReconnectionDelay,maxReconnectionDelay:a=Lr.maxReconnectionDelay}=this._options;let u=0;return this._retryCount>0&&(u=o*Math.pow(s,this._retryCount-1),u>a&&(u=a)),this._debug("next delay",u),u}_wait(){return new Promise(s=>{setTimeout(s,this._getNextDelay())})}_getNextProtocols(s){if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(typeof s=="function"){const o=s();if(!o)return Promise.resolve(null);if(typeof o=="string"||Array.isArray(o))return Promise.resolve(o);if(o.then)return o}throw Error("Invalid protocols")}_getNextUrl(s){if(typeof s=="string")return Promise.resolve(s);if(typeof s=="function"){const o=s();if(typeof o=="string")return Promise.resolve(o);if(o.then)return o}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:s=Lr.maxRetries,connectionTimeout:o=Lr.connectionTimeout}=this._options;if(this._retryCount>=s){this._debug("max retries reached",this._retryCount,">=",s);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,u])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Mm&&(console.error(`‼️ No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: import PartySocket from 'partysocket'; import WS from 'ws'; const partysocket = new PartySocket({ host: "127.0.0.1:1999", room: "test-room", WebSocket: WS }); `),Mm=!0);const d=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:u}),this._ws=u?new d(a,u):new d(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),o)}).catch(a=>{this._connectLock=!1,this._handleError(new ac.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new ac.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(s=1e3,o){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(s,o),this._handleClose(new ac.CloseEvent(s,o,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! * Reconnecting WebSocket * by Pedro Ladaria * https://github.com/pladaria/reconnecting-websocket * License MIT */var Vk=n=>n[1]!==null&&n[1]!==void 0;function Wk(){if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();let n=new Date().getTime(),t=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(s){let o=Math.random()*16;return n>0?(o=(n+o)%16|0,n=Math.floor(n/16)):(o=(t+o)%16|0,t=Math.floor(t/16)),(s==="x"?o:o&3|8).toString(16)})}function lv(n,t,s={}){const{host:o,path:a,protocol:u,room:d,party:p,query:h}=n;let m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),a&&a.startsWith("/"))throw new Error("path must not start with a slash");const v=p??"main",w=a?`/${a}`:"",k=u||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?t:t+"s"),j=`${k}://${m}/${p?`parties/${p}`:"party"}/${d}${w}`,M=(x={})=>`${j}?${new URLSearchParams([...Object.entries(s),...Object.entries(x).filter(Vk)])}`,_=typeof h=="function"?async()=>M(await h()):M(h);return{host:m,path:w,room:d,name:v,protocol:k,partyUrl:j,urlProvider:_}}var Hk=class extends $k{constructor(t){const s=Um(t);super(s.urlProvider,s.protocols,s.socketOptions);Le(this,"_pk");Le(this,"_pkurl");Le(this,"name");Le(this,"room");Le(this,"host");Le(this,"path");this.partySocketOptions=t,this.setWSProperties(s)}updateProperties(t){const s=Um({...t,host:t.host??this.host,room:t.room??this.room,path:t.path??this.path});this._url=s.urlProvider,this._protocols=s.protocols,this._options=s.socketOptions,this.setWSProperties(s)}setWSProperties(t){const{_pk:s,_pkurl:o,name:a,room:u,host:d,path:p}=t;this._pk=s,this._pkurl=o,this.name=a,this.room=u,this.host=d,this.path=p}reconnect(t,s){if(!this.room||!this.host)throw new Error("The room and host must be set before connecting, use `updateProperties` method to set them or pass them to the constructor.");super.reconnect(t,s)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(t,s){const o=lv(t,"http"),a=typeof o.urlProvider=="string"?o.urlProvider:await o.urlProvider();return(t.fetch??fetch)(a,s)}};function Um(n){const{id:t,host:s,path:o,party:a,room:u,protocol:d,query:p,protocols:h,...m}=n,v=t||Wk(),w=lv(n,"ws",{_pk:v});return{_pk:v,_pkurl:w.partyUrl,name:w.name,room:w.room,host:w.host,path:w.path,protocols:h,socketOptions:m,urlProvider:w.urlProvider}}const qk=1e3,Qk=3e3;class Kk{constructor(t,s,o,a,u){var d;this.onClose=u,this.listeners=new Set,this.heartbeat=null,this.id=(d=a==null?void 0:a.id)!==null&&d!==void 0?d:crypto.randomUUID();const p=new Hk({host:o.host,party:t,room:s,id:this.id,query:()=>{const v=o.getAuthToken();return{app_id:o.appId,handler:t,...v?{token:v}:{},...o.functionsVersion?{fv:o.functionsVersion}:{}}}});this.ws=p;let h=Date.now();const m=()=>{h=Date.now()};p.addEventListener("open",m),p.addEventListener("message",v=>{m();let w;try{w=JSON.parse(v.data)}catch{return}if((w&&typeof w=="object"?w.type:void 0)!=="__pong")for(const j of this.listeners)j(w)}),this.heartbeat=setInterval(()=>{if(Date.now()-h>Qk){m(),p.reconnect();return}try{p.send(JSON.stringify({type:"__ping"}))}catch{}},qk)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.ws.send(JSON.stringify(t))}close(){this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose()}}function Gk(n,t,s,o){let a=null;return{connect(u){if(a)return a;const d=new Kk(n,t,s,u,()=>{o.delete(d),a===d&&(a=null)});return a=d,o.add(d),d}}}function Yk(n,t){return n&&!n.startsWith("/")?n:t??n}function Xk(n){const t=new Set;return{module:new Proxy({},{get(o,a){if(!(typeof a!="string"||a==="then"))return u=>Gk(a,u,n,t)}}),closeAll:()=>{for(const o of[...t])o.close()}}}function Jk(n){var t,s,o;const{serverUrl:a="https://base44.app",appId:u,token:d,serviceToken:p,requiresAuth:h=!1,appBaseUrl:m,options:v,functionsVersion:w,headers:k}=n,j=typeof m=="string"?m:"",M={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:u,token:d};let _=null;const x=()=>(_||(_=Fk({config:M})),_),S={...k,"X-App-Id":String(u)},L=w?{...S,"Base44-Functions-Version":w}:S,N=Bo({baseURL:`${a}/api`,headers:S,token:d,onError:v==null?void 0:v.onError}),A=Bo({baseURL:`${a}/api`,headers:L,token:d,interceptResponses:!1,onError:v==null?void 0:v.onError}),V={...S,...d?{"on-behalf-of":`Bearer ${d}`}:{}},$=Bo({baseURL:`${a}/api`,headers:V,token:p,onError:v==null?void 0:v.onError}),G=Bo({baseURL:`${a}/api`,headers:L,token:p,interceptResponses:!1}),z=F_(N,A,u,{appBaseUrl:j});if(typeof window<"u"){const xe=d||Kr();xe&&z.setToken(xe)}const ie=Xk({appId:u,host:Yk(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:w,getAuthToken:()=>d||Kr()}),ue={entities:Cm({axios:N,appId:u,getSocket:x}),integrations:Rm(N,u),connectors:B_(N,u),auth:z,functions:Tm(A,u,{getAuthHeaders:()=>{const xe={},J=d||Kr();return J&&(xe.Authorization=`Bearer ${J}`),xe},baseURL:(s=A.defaults)===null||s===void 0?void 0:s.baseURL}),agents:Nm({axios:N,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Pm({serverUrl:a,token:d,appId:u}),appLogs:Om(N,u),users:$_(N,u),analytics:b_({axiosClient:N,serverUrl:a,appId:u,userAuthModule:z}),actors:ie.module,cleanup:()=>{ue.analytics.cleanup(),ie.closeAll(),_&&_.disconnect()}},Ee={entities:Cm({axios:$,appId:u,getSocket:x}),integrations:Rm($,u),sso:M_($,u),connectors:U_($,u),functions:Tm(G,u,{getAuthHeaders:()=>{const xe={};return p&&(xe.Authorization=`Bearer ${p}`),xe},baseURL:(o=G.defaults)===null||o===void 0?void 0:o.baseURL}),agents:Nm({axios:$,getSocket:x,appId:u,serverUrl:a,token:d}),aiGateway:Pm({serverUrl:a,token:p,appId:u}),appLogs:Om($,u),cleanup:()=>{_&&_.disconnect()}};return h&&typeof window<"u"&&setTimeout(async()=>{try{await ue.auth.isAuthenticated()||ue.auth.redirectToLogin(window.location.href)}catch(xe){console.error("Authentication check failed:",xe),ue.auth.redirectToLogin(window.location.href)}},0),{...ue,setToken(xe){ue.auth.setToken(xe),_&&_.updateConfig({token:xe}),M.token=xe},getConfig(){return{serverUrl:a,appId:u,requiresAuth:h}},get asServiceRole(){if(!p)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return Ee}}}const uv=typeof window>"u",Zk=uv?{localStorage:new Map}:window,Ho=Zk.localStorage,eC=n=>n.replace(/([A-Z])/g,"_$1").toLowerCase(),Ns=(n,{defaultValue:t=void 0,removeFromUrl:s=!1}={})=>{if(uv)return t;const o=`base44_${eC(n)}`,a=new URLSearchParams(window.location.search),u=a.get(n);if(s){a.delete(n);const p=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,p)}if(u)return Ho.setItem(o,u),u;if(t)return Ho.setItem(o,t),t;const d=Ho.getItem(o);return d||null},tC=()=>(Ns("clear_access_token")==="true"&&(Ho.removeItem("base44_access_token"),Ho.removeItem("token")),{appId:Ns("app_id",{defaultValue:"6a7a8de3a209c3ddc7b335c6"}),token:Ns("access_token",{removeFromUrl:!0}),fromUrl:Ns("from_url",{defaultValue:window.location.href}),functionsVersion:Ns("functions_version",{defaultValue:"prod"}),appBaseUrl:Ns("app_base_url",{defaultValue:void 0})}),$o={...tC()},{appId:nC,token:rC,functionsVersion:sC,appBaseUrl:oC}=$o,Vo=Jk({appId:nC,token:rC,functionsVersion:sC,serverUrl:"",requiresAuth:!1,appBaseUrl:oC});function iC({}){var a;const t=rs().pathname.substring(1),{data:s,isFetched:o}=iE({queryKey:["user"],queryFn:async()=>{try{return{user:await Vo.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return g.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:g.jsx("div",{className:"max-w-md w-full",children:g.jsxs("div",{className:"text-center space-y-6",children:[g.jsxs("div",{className:"space-y-2",children:[g.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),g.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),g.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",g.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),o&&s.isAuthenticated&&((a=s.user)==null?void 0:a.role)==="admin"&&g.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:g.jsxs("div",{className:"flex items-start space-x-3",children:[g.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:g.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),g.jsxs("div",{className:"text-left space-y-1",children:[g.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),g.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),g.jsx("div",{className:"pt-6",children:g.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[g.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const cv=b.createContext(),aC=({children:n})=>{const[t,s]=b.useState(null),[o,a]=b.useState(!1),[u,d]=b.useState(!0),[p,h]=b.useState(!0),[m,v]=b.useState(null),[w,k]=b.useState(!1),[j,M]=b.useState(null);b.useEffect(()=>{_()},[]);const _=async()=>{var N,A;try{h(!0),v(null);const V=Bo({baseURL:"/api/apps/public",headers:{"X-App-Id":$o.appId},token:$o.token,interceptResponses:!0});try{const $=await V.get(`/prod/public-settings/by-id/${$o.appId}`);M($),$o.token?await x():(d(!1),a(!1),k(!0)),h(!1)}catch($){if(console.error("App state check failed:",$),$.status===403&&((A=(N=$.data)==null?void 0:N.extra_data)!=null&&A.reason)){const G=$.data.extra_data.reason;v(G==="auth_required"?{type:"auth_required",message:"Authentication required"}:G==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:G,message:$.message})}else v({type:"unknown",message:$.message||"Failed to load app"});h(!1),d(!1)}}catch(V){console.error("Unexpected error:",V),v({type:"unknown",message:V.message||"An unexpected error occurred"}),h(!1),d(!1)}},x=async()=>{try{d(!0);const N=await Vo.auth.me();s(N),a(!0),d(!1),k(!0)}catch(N){console.error("User auth check failed:",N),d(!1),a(!1),k(!0),(N.status===401||N.status===403)&&v({type:"auth_required",message:"Authentication required"})}},S=(N=!0)=>{s(null),a(!1),N?Vo.auth.logout(window.location.href):Vo.auth.logout()},L=()=>{Vo.auth.redirectToLogin(window.location.href)};return g.jsx(cv.Provider,{value:{user:t,isAuthenticated:o,isLoadingAuth:u,isLoadingPublicSettings:p,authError:m,appPublicSettings:j,authChecked:w,logout:S,navigateToLogin:L,checkUserAuth:x,checkAppState:_},children:n})},lC=()=>{const n=b.useContext(cv);if(!n)throw new Error("useAuth must be used within an AuthProvider");return n},uC=()=>g.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:g.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:g.jsxs("div",{className:"text-center",children:[g.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:g.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),g.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),g.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),g.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[g.jsx("p",{children:"If you believe this is an error, you can:"}),g.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[g.jsx("li",{children:"Verify you are logged in with the correct account"}),g.jsx("li",{children:"Contact the app administrator for access"}),g.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),cC=n=>{const t=n.slice(1);try{return decodeURIComponent(t)}catch{return t}};function dC(){const{pathname:n,hash:t}=rs(),s=FE();return b.useEffect(()=>{if(s!=="POP"){if(t){const o=cC(t),a=window.setTimeout(()=>{var u;(u=document.getElementById(o))==null||u.scrollIntoView({behavior:"smooth"})},50);return()=>window.clearTimeout(a)}window.scrollTo({top:0,left:0,behavior:"instant"})}},[n,t,s]),null}const fC=[{label:"ABOUT",path:"/about"},{label:"OUR BUSINESS",path:"/our-business",active:!0},{label:"GOVERNANCE",path:"/governance"},{label:"INVESTORS",path:"/investors"},{label:"MEDIA",path:"/media"},{label:"CONTACT",path:"/contact"}];function pC(){const[n,t]=b.useState(!1),[s,o]=b.useState("EN"),a=rs();b.useEffect(()=>{const d=()=>t(window.scrollY>40);return window.addEventListener("scroll",d),()=>window.removeEventListener("scroll",d)},[]);const u=n&&a.pathname.includes("/our-business");return g.jsx("header",{dir:"ltr",className:"fixed top-0 left-0 right-0 z-50 border-b transition-colors duration-200",style:{background:u?"#102331":"#F8F8F5",borderColor:u?"rgba(248,248,245,0.12)":"rgba(16,35,49,0.12)"},children:g.jsxs("div",{className:"mx-auto flex items-center justify-between",style:{maxWidth:"1360px",height:"92px",padding:"0 72px"},children:[g.jsxs(Yt,{to:"/",className:"flex items-center gap-2","aria-label":"Alrazah Holding home",children:[g.jsx("span",{className:"text-[20px] font-semibold tracking-[0.12em]",style:{color:u?"#F8F8F5":"#102331"},children:"ALRAZAH"}),g.jsx("span",{className:"hidden text-[10px] uppercase tracking-[0.18em] sm:inline",style:{color:u?"rgba(248,248,245,0.55)":"rgba(16,35,49,0.5)"},children:"Holding"})]}),g.jsx("nav",{className:"hidden items-center lg:flex","aria-label":"Primary",children:fC.map(d=>g.jsxs(Yt,{to:d.path,className:"group relative flex items-center px-5 text-[12px] uppercase tracking-[0.14em] transition-colors",style:{color:u?"#F8F8F5":"#102331",height:"92px"},children:[d.active&&g.jsx("span",{className:"mr-2 inline-block h-[5px] w-[5px]",style:{background:"#A78B55"}}),g.jsx("span",{className:"border-b border-transparent transition-colors duration-150 group-hover:border-current",children:d.label})]},d.label))}),g.jsx("div",{className:"flex items-center gap-4",children:g.jsxs("button",{onClick:()=>o(d=>d==="EN"?"AR":"EN"),className:"text-[12px] uppercase tracking-[0.14em] transition-colors",style:{color:u?"#F8F8F5":"#102331"},"aria-label":"Switch language",children:[s," / ",s==="EN"?"AR":"EN"]})})]})})}const hC=[{title:"ABOUT",links:["Overview","Leadership","Governance","Sustainability","Our Approach"]},{title:"OUR BUSINESS",links:["Overview","Real Estate","Logistics & Industrial","Asset Management","Project Management"]},{title:"INVESTORS",links:["Investor Relations","Financial Information","Reports","Disclosures"]},{title:"MEDIA",links:["News","Announcements","Media Centre"]},{title:"CONTACT",links:["Doha, Qatar","Contact Us","Careers"]}];function mC(){return g.jsx("footer",{style:{background:"#1B252B",color:"#F8F8F5"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px 40px"},children:[g.jsxs("div",{className:"grid grid-cols-1 gap-12 lg:grid-cols-[1.4fr_3fr]",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[22px] font-semibold tracking-[0.14em]",children:"ALRAZAH HOLDING"}),g.jsx("p",{className:"mt-5 max-w-xs text-[14px] leading-[1.7]",style:{color:"rgba(248,248,245,0.6)"},children:"Qatari investment and holding company focused on long-term value creation."})]}),g.jsx("div",{className:"grid grid-cols-2 gap-10 sm:grid-cols-3 lg:grid-cols-5",children:hC.map(n=>g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.16em]",style:{color:"#A78B55"},children:n.title}),g.jsx("ul",{className:"mt-5 space-y-3",children:n.links.map(t=>g.jsx("li",{children:g.jsx(Yt,{to:"#",className:"text-[13px] transition-colors hover:text-white",style:{color:"rgba(248,248,245,0.62)"},children:t})},t))})]},n.title))})]}),g.jsx("div",{className:"my-10 h-px w-full",style:{background:"rgba(248,248,245,0.14)"}}),g.jsxs("div",{className:"flex flex-col items-start justify-between gap-4 sm:flex-row sm:items-center",children:[g.jsx("div",{className:"text-[12px] uppercase tracking-[0.14em]",style:{color:"rgba(248,248,245,0.5)"},children:"© ALRAZAH HOLDING"}),g.jsxs("div",{className:"flex items-center gap-6",children:[["Privacy","Terms","Legal"].map(n=>g.jsx(Yt,{to:"#",className:"text-[12px] uppercase tracking-[0.14em] transition-colors hover:text-white",style:{color:"rgba(248,248,245,0.5)"},children:n},n)),g.jsx("span",{className:"text-[12px] uppercase tracking-[0.14em]",style:{color:"rgba(248,248,245,0.5)"},children:"EN / AR"})]})]})]})})}function gC({items:n,dark:t=!1}){const s=t?"rgba(248,248,245,0.55)":"rgba(16,35,49,0.55)",o=t?"#F8F8F5":"#102331";return g.jsx("nav",{"aria-label":"Breadcrumb",className:"flex flex-wrap items-center gap-2 text-[12px] uppercase tracking-[0.12em]",children:n.map((a,u)=>{const d=u===n.length-1;return g.jsxs(Qt.Fragment,{children:[a.path&&!d?g.jsx(Yt,{to:a.path,className:"transition-colors hover:opacity-100",style:{color:s},children:a.label}):g.jsx("span",{style:{color:d?o:s},children:a.label}),!d&&g.jsx("span",{style:{color:s},children:"/"})]},u)})})}const yC="https://media.base44.com/images/public/6a7a8de3a209c3ddc7b335c6/b8eac924a_generated_b1aa5112.png";function vC(){return g.jsx("section",{style:{background:"#F1EFEA",paddingTop:"140px"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"0 72px 88px"},children:[g.jsx(gC,{items:[{label:"Home",path:"/"},{label:"Our Business",path:"/our-business"},{label:"Asset Management",path:"/our-business/asset-management"},{label:"Portfolio Performance"}]}),g.jsxs("div",{className:"mt-16 grid grid-cols-1 gap-12 lg:grid-cols-[1.5fr_1fr] lg:items-end",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Portfolio Performance"}),g.jsxs("h1",{className:"mt-7 text-[56px] font-semibold leading-[1.04] sm:text-[68px]",style:{color:"#102331"},children:["Measuring value.",g.jsx("br",{}),"Managing performance."]}),g.jsx("p",{className:"mt-8 max-w-xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.72)"},children:"Alrazah monitors the performance of its portfolio through disciplined financial analysis, active oversight and a long-term assessment of value creation."}),g.jsxs("div",{className:"mt-10 flex flex-wrap items-center gap-6",children:[g.jsxs(Yt,{to:"/our-business/asset-management/investment-strategy",className:"group inline-flex h-[48px] items-center px-6 text-[12px] uppercase tracking-[0.14em] transition-colors duration-150",style:{background:"#102331",color:"#F8F8F5"},children:["Our Investment Strategy",g.jsx("span",{className:"ml-3 transition-transform duration-150 group-hover:translate-x-1",children:"→"})]}),g.jsx(Yt,{to:"/investors",className:"inline-flex h-[48px] items-center px-6 text-[12px] uppercase tracking-[0.14em] transition-colors duration-150",style:{border:"1px solid rgba(16,35,49,0.3)",color:"#102331"},children:"Investor Information →"})]})]}),g.jsxs("div",{className:"lg:pl-10",children:[g.jsx("div",{className:"overflow-hidden",style:{border:"1px solid rgba(16,35,49,0.12)"},children:g.jsx("img",{src:yC,alt:"Modern Doha commercial architecture representing Alrazah's real asset portfolio",className:"h-full w-full object-cover",style:{aspectRatio:"4 / 3"}})}),g.jsx("div",{className:"mt-3 text-[11px] uppercase tracking-[0.14em]",style:{color:"rgba(16,35,49,0.45)"},children:"Doha Commercial District — Representative Asset Class"})]})]})]})})}const wC=["Long-Term Value","Capital Discipline","Portfolio Resilience"];function xC(){return g.jsx("section",{style:{background:"#102331",color:"#F8F8F5"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"100px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Our Performance Perspective"}),g.jsx("h2",{className:"mt-7 max-w-3xl text-[40px] font-medium leading-[1.12] sm:text-[48px]",children:"Performance is measured beyond the immediate cycle."}),g.jsx("p",{className:"mt-8 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(248,248,245,0.72)"},children:"Alrazah evaluates portfolio performance through a combination of financial results, asset quality, operating performance, capital efficiency and long-term value creation. Our objective is to build a portfolio capable of generating sustainable returns while maintaining resilience through changing market conditions."}),g.jsx("div",{className:"mt-16 grid grid-cols-1 divide-y sm:grid-cols-3 sm:divide-x sm:divide-y-0",style:{borderColor:"rgba(248,248,245,0.16)"},children:wC.map((n,t)=>g.jsxs("div",{className:"px-0 py-8 sm:px-10 sm:first:pl-0",style:{borderColor:"rgba(248,248,245,0.16)"},children:[g.jsxs("div",{className:"text-[11px] uppercase tracking-[0.16em]",style:{color:"rgba(248,248,245,0.5)"},children:["0",t+1]}),g.jsx("div",{className:"mt-4 text-[22px] font-medium leading-[1.2]",children:n})]},n))})]})})}const lc=["FY2026","FY2025","FY2024","FY2023"],EC=[{label:"Portfolio Value",value:"[VALUE]",unit:"QAR",period:"[PERIOD]"},{label:"Revenue",value:"[VALUE]",unit:"QAR",period:"[PERIOD]"},{label:"Operating Result",value:"[VALUE]",unit:"QAR",period:"[PERIOD]"},{label:"Portfolio Growth",value:"[VALUE]",unit:"YoY",period:"[PERIOD]"}];function SC(){const[n,t]=b.useState("FY2026");return g.jsx("section",{style:{background:"#E8E9E6"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Portfolio At A Glance"}),g.jsx("h2",{className:"mt-5 text-[36px] font-medium leading-[1.1] sm:text-[42px]",style:{color:"#102331"},children:"Key indicators of portfolio development."}),g.jsx("p",{className:"mt-4 max-w-xl text-[16px] leading-[1.65]",style:{color:"rgba(16,35,49,0.65)"},children:"Key performance indicators provide a consolidated view of portfolio development and financial progress."})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"rgba(16,35,49,0.5)"},children:"Period"}),g.jsx("div",{className:"flex",style:{border:"1px solid rgba(16,35,49,0.18)"},children:lc.map(s=>g.jsx("button",{onClick:()=>t(s),className:"px-4 py-2 text-[12px] uppercase tracking-[0.1em] transition-colors duration-150",style:{background:n===s?"#102331":"transparent",color:n===s?"#F8F8F5":"#102331",borderRight:s!==lc[lc.length-1]?"1px solid rgba(16,35,49,0.18)":"none"},children:s},s))})]})]}),g.jsx("div",{className:"mt-12 grid grid-cols-1 divide-y sm:grid-cols-2 sm:divide-y-0 lg:grid-cols-4 lg:divide-x",style:{borderColor:"rgba(16,35,49,0.16)",borderTop:"1px solid rgba(16,35,49,0.16)",borderBottom:"1px solid rgba(16,35,49,0.16)"},children:EC.map(s=>g.jsxs("div",{className:"px-0 py-10 sm:px-8 lg:px-10 lg:first:pl-0",children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"rgba(16,35,49,0.5)"},children:s.label}),g.jsx("div",{className:"mt-6 text-[52px] font-medium leading-[1]",style:{color:"#102331",fontVariantNumeric:"tabular-nums"},children:s.value}),g.jsxs("div",{className:"mt-2 text-[13px] uppercase tracking-[0.12em]",style:{color:"rgba(16,35,49,0.45)"},children:[s.unit," · ",s.period]})]},s.label))}),g.jsxs("div",{className:"mt-10 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[g.jsx("p",{className:"max-w-2xl text-[12px] leading-[1.6]",style:{color:"rgba(16,35,49,0.55)"},children:"Performance data is presented for the periods indicated and should be read together with Alrazah's published financial statements and relevant disclosures. Comparative indicators are displayed only when verified data is available."}),g.jsxs(Yt,{to:"/investors/reports",className:"group inline-flex shrink-0 items-center text-[12px] uppercase tracking-[0.14em] transition-colors",style:{color:"#102331"},children:["View Financial Reports",g.jsx("span",{className:"ml-2 transition-transform duration-150 group-hover:translate-x-1",children:"→"})]})]})]})})}const bC=[{n:"01",title:"Financial Performance",desc:"Revenue, profitability, cash generation and capital efficiency."},{n:"02",title:"Operating Performance",desc:"Underlying business performance and operational execution."},{n:"03",title:"Asset Quality",desc:"Condition, utilisation, development potential and strategic relevance of assets."},{n:"04",title:"Capital Efficiency",desc:"How effectively capital is deployed relative to risk and expected value."},{n:"05",title:"Strategic Position",desc:"Competitive positioning, market relevance and long-term strategic fit."},{n:"06",title:"Long-Term Value",desc:"The sustainability and durability of value created over time."}];function _C(){return g.jsx("section",{style:{background:"#F8F8F5"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Performance Framework"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",style:{color:"#102331"},children:"A broader measure of performance."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.7)"},children:"Financial performance provides an essential measure of progress, but sustainable portfolio value depends on a broader set of factors. Alrazah considers financial, operational, strategic and asset-level indicators when evaluating performance."}),g.jsx("div",{className:"mt-14 grid grid-cols-1 gap-px sm:grid-cols-2 lg:grid-cols-6",style:{background:"rgba(16,35,49,0.12)",border:"1px solid rgba(16,35,49,0.12)"},children:bC.map(n=>g.jsxs("div",{className:"p-7",style:{background:"#F8F8F5"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:n.n}),g.jsx("div",{className:"mt-4 text-[16px] font-semibold leading-[1.25]",style:{color:"#102331"},children:n.title}),g.jsx("p",{className:"mt-3 text-[13px] leading-[1.6]",style:{color:"rgba(16,35,49,0.6)"},children:n.desc})]},n.n))})]})})}const Bm=[{name:"Real Estate",sub:["Commercial","Residential","Mixed-Use","Land & Development"]},{name:"Logistics & Industrial",sub:["Warehousing","Distribution","Cold Storage","Industrial Parks"]},{name:"Asset Management",sub:["Portfolio Management","Strategic Investments","Capital Allocation"]},{name:"Project Management",sub:["Development","Engineering","Execution"]}];function kC(){const[n,t]=b.useState("Real Estate");return g.jsx("section",{style:{background:"#E9E3D8"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Portfolio Composition"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",style:{color:"#102331"},children:"A diversified portfolio across the real economy."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.7)"},children:"Alrazah's portfolio is diversified across complementary sectors that support Qatar's economic development and provide multiple avenues for long-term value creation."}),g.jsxs("div",{className:"mt-14 grid grid-cols-1 gap-px lg:grid-cols-[1fr_1fr]",style:{border:"1px solid rgba(16,35,49,0.14)"},children:[g.jsx("div",{className:"flex flex-col",style:{background:"rgba(16,35,49,0.04)"},children:Bm.map(s=>{const o=n===s.name;return g.jsxs("button",{onClick:()=>t(s.name),className:"group flex items-center justify-between px-8 py-7 text-left transition-colors duration-150",style:{background:o?"#F1EFEA":"transparent",borderBottom:"1px solid rgba(16,35,49,0.14)",color:"#102331"},children:[g.jsx("span",{className:"text-[18px] font-medium",children:s.name}),g.jsx("span",{className:"text-[20px] transition-transform duration-150 group-hover:translate-x-1",style:{color:o?"#A78B55":"rgba(16,35,49,0.35)"},children:"→"})]},s.name)})}),g.jsxs("div",{className:"p-10",style:{background:"#F1EFEA"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:"Selected Sector"}),g.jsx("div",{className:"mt-3 text-[28px] font-medium",style:{color:"#102331"},children:n}),g.jsx("div",{className:"mt-8 h-px w-full",style:{background:"rgba(16,35,49,0.16)"}}),g.jsx("ul",{className:"mt-6 divide-y",style:{borderColor:"rgba(16,35,49,0.12)"},children:Bm.find(s=>s.name===n).sub.map(s=>g.jsxs("li",{className:"flex items-center justify-between py-4 text-[15px]",style:{color:"rgba(16,35,49,0.78)"},children:[s,g.jsx("span",{className:"text-[12px] uppercase tracking-[0.1em]",style:{color:"rgba(16,35,49,0.4)"},children:"Allocation [—]"})]},s))}),g.jsx("p",{className:"mt-6 text-[12px] leading-[1.6]",style:{color:"rgba(16,35,49,0.5)"},children:"Verified sector allocations will be displayed here when published data is available."}),g.jsx(Yt,{to:"/our-business",className:"mt-6 inline-flex items-center text-[12px] uppercase tracking-[0.14em]",style:{color:"#102331"},children:"Explore sector →"})]})]})]})})}const CC=[{n:"01",title:"Asset Development",desc:"Developing assets to improve their long-term utility and economic potential."},{n:"02",title:"Operational Improvement",desc:"Strengthening operating performance through disciplined management and execution."},{n:"03",title:"Capital Allocation",desc:"Directing resources toward opportunities with attractive long-term risk-adjusted potential."},{n:"04",title:"Strategic Positioning",desc:"Building positions in sectors and markets with enduring structural relevance."}];function RC(){return g.jsx("section",{style:{background:"#1B252B",color:"#F8F8F5"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"100px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Value Creation"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",children:"Performance is driven by the quality of the underlying assets."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(248,248,245,0.7)"},children:"Alrazah's portfolio performance reflects more than capital appreciation. We seek to improve the underlying quality, productivity and strategic positioning of the businesses and assets we own."}),g.jsx("div",{className:"mt-14 grid grid-cols-1 gap-px sm:grid-cols-2 lg:grid-cols-4",style:{background:"rgba(248,248,245,0.14)"},children:CC.map(n=>g.jsxs("div",{className:"p-8",style:{background:"#1B252B"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:n.n}),g.jsx("div",{className:"mt-5 text-[20px] font-semibold leading-[1.2]",children:n.title}),g.jsx("p",{className:"mt-4 text-[14px] leading-[1.65]",style:{color:"rgba(248,248,245,0.62)"},children:n.desc})]},n.n))})]})})}const zm=["All","Real Estate","Logistics","Industrial","Other"],TC=[{sector:"Real Estate",period:"FY2026",performance:"[DATA]",driver:"Asset development",status:"On Track"},{sector:"Logistics & Industrial",period:"FY2026",performance:"[DATA]",driver:"Demand / utilisation",status:"On Track"},{sector:"Asset Management",period:"FY2026",performance:"[DATA]",driver:"Portfolio contribution",status:"Under Review"},{sector:"Project Management",period:"FY2026",performance:"[DATA]",driver:"Execution milestones",status:"On Track"}],uc={"Real Estate":{overview:"[Verified data — performance overview to be published with approved financial statements.]",developments:"[Verified content — key developments across commercial, residential and mixed-use assets.]",contribution:"[Verified data — portfolio contribution relative to consolidated value.]"},"Logistics & Industrial":{overview:"[Verified data — warehousing, distribution and industrial park utilisation.]",developments:"[Verified content — demand environment and capacity expansion.]",contribution:"[Verified data — contribution to consolidated operating performance.]"},"Asset Management":{overview:"[Verified data — portfolio management and strategic investment performance.]",developments:"[Verified content — capital allocation decisions and portfolio repositioning.]",contribution:"[Verified data — contribution from investment activities.]"},"Project Management":{overview:"[Verified data — development and engineering execution progress.]",developments:"[Verified content — milestone delivery across active projects.]",contribution:"[Verified data — contribution from development activities.]"}},$m={"On Track":"#A78B55","Under Review":"#6B2020"};function NC(){const[n,t]=b.useState("All"),[s,o]=b.useState(null),a=TC.filter(u=>n==="All"||u.sector.startsWith(n));return g.jsx("section",{style:{background:"#F8F8F5"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Sector Performance"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",style:{color:"#102331"},children:"Performance across our operating sectors."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.7)"},children:"Portfolio performance is evaluated at both the consolidated and underlying-business level, allowing management to identify areas of strength, emerging opportunities and areas requiring greater attention."}),g.jsx("div",{className:"mt-10 flex flex-wrap items-center gap-3 text-[13px] uppercase tracking-[0.12em]",children:zm.map((u,d)=>g.jsxs(Qt.Fragment,{children:[g.jsx("button",{onClick:()=>t(u),className:"transition-colors duration-150",style:{color:n===u?"#102331":"rgba(16,35,49,0.45)",fontWeight:n===u?600:400,borderBottom:n===u?"1px solid #A78B55":"1px solid transparent",paddingBottom:"4px"},children:u}),d{const d=s===u.sector;return g.jsxs(Qt.Fragment,{children:[g.jsxs("tr",{onClick:()=>o(d?null:u.sector),className:"cursor-pointer transition-colors duration-150",style:{borderTop:"1px solid rgba(16,35,49,0.1)",background:d?"#F1EFEA":"transparent"},children:[g.jsx("td",{className:"py-6 pr-6 text-[15px] font-medium",style:{color:"#102331"},children:u.sector}),g.jsx("td",{className:"py-6 pr-6 text-[13px] uppercase tracking-[0.1em]",style:{color:"rgba(16,35,49,0.6)"},children:u.period}),g.jsx("td",{className:"py-6 pr-6 text-[15px]",style:{color:"#102331",fontVariantNumeric:"tabular-nums"},children:u.performance}),g.jsx("td",{className:"py-6 pr-6 text-[14px]",style:{color:"rgba(16,35,49,0.7)"},children:u.driver}),g.jsx("td",{className:"py-6 pr-6",children:g.jsxs("span",{className:"inline-flex items-center text-[12px] uppercase tracking-[0.1em]",style:{color:$m[u.status]},children:[g.jsx("span",{className:"mr-2 inline-block h-[6px] w-[6px]",style:{background:$m[u.status]}}),u.status]})}),g.jsx("td",{className:"py-6 text-right text-[18px] transition-transform duration-150",style:{color:"#A78B55",transform:d?"rotate(90deg)":"none"},children:"→"})]}),d&&g.jsx("tr",{style:{background:"#F1EFEA"},children:g.jsx("td",{colSpan:6,className:"px-6 pb-8 pt-2",children:g.jsxs("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-3",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:"Performance overview"}),g.jsx("p",{className:"mt-3 text-[13px] leading-[1.6]",style:{color:"rgba(16,35,49,0.7)"},children:uc[u.sector].overview})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:"Key developments"}),g.jsx("p",{className:"mt-3 text-[13px] leading-[1.6]",style:{color:"rgba(16,35,49,0.7)"},children:uc[u.sector].developments})]}),g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:"Portfolio contribution"}),g.jsx("p",{className:"mt-3 text-[13px] leading-[1.6]",style:{color:"rgba(16,35,49,0.7)"},children:uc[u.sector].contribution})]})]})})})]},u.sector)})})]})}),g.jsx("p",{className:"mt-6 text-[12px] leading-[1.6]",style:{color:"rgba(16,35,49,0.5)"},children:"Sector-level figures will be presented alongside Alrazah's published segment reporting when verified data is available."})]})})}const cc=["1Y","3Y","5Y","10Y"],PC=[{year:2026,value:"[VALUE]",change:"[X.X%]",note:"[TEXT]"},{year:2025,value:"[VALUE]",change:"[X.X%]",note:"[TEXT]"},{year:2024,value:"[VALUE]",change:"[X.X%]",note:"[TEXT]"},{year:2023,value:"[VALUE]",change:"[X.X%]",note:"[TEXT]"}];function OC(){const[n,t]=b.useState("5Y");return g.jsx("section",{style:{background:"#E8E9E6"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row lg:items-end lg:justify-between",children:[g.jsxs("div",{children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Performance Trends"}),g.jsx("h2",{className:"mt-6 text-[40px] font-medium leading-[1.12] sm:text-[46px]",style:{color:"#102331"},children:"Performance over time."})]}),g.jsx("div",{className:"flex",style:{border:"1px solid rgba(16,35,49,0.18)"},children:cc.map(s=>g.jsx("button",{onClick:()=>t(s),className:"px-4 py-2 text-[12px] uppercase tracking-[0.1em] transition-colors duration-150",style:{background:n===s?"#102331":"transparent",color:n===s?"#F8F8F5":"#102331",borderRight:s!==cc[cc.length-1]?"1px solid rgba(16,35,49,0.18)":"none"},children:s},s))})]}),g.jsxs("div",{className:"mt-12",style:{border:"1px solid rgba(16,35,49,0.14)"},children:[g.jsxs("div",{className:"flex items-center justify-between px-6 py-4",style:{borderBottom:"1px solid rgba(16,35,49,0.14)"},children:[g.jsxs("div",{className:"text-[12px] uppercase tracking-[0.12em]",style:{color:"rgba(16,35,49,0.6)"},children:["Portfolio Performance Trend — ",n]}),g.jsxs("div",{className:"flex items-center gap-5 text-[11px] uppercase tracking-[0.1em]",children:[g.jsxs("span",{className:"flex items-center gap-2",style:{color:"rgba(16,35,49,0.6)"},children:[g.jsx("span",{className:"inline-block h-[2px] w-6",style:{background:"#102331"}}),"Portfolio"]}),g.jsxs("span",{className:"flex items-center gap-2",style:{color:"rgba(16,35,49,0.6)"},children:[g.jsx("span",{className:"inline-block h-[2px] w-6 border-t border-dashed",style:{borderColor:"#A78B55"}}),"Benchmark"]})]})]}),g.jsxs("div",{className:"relative",style:{background:"#E8E9E6",height:"360px"},children:[g.jsx("div",{className:"absolute inset-0 flex flex-col justify-between px-10 py-8",children:[0,1,2,3,4].map(s=>g.jsx("div",{className:"w-full",style:{borderTop:"1px solid rgba(16,35,49,0.08)"}},s))}),g.jsxs("div",{className:"absolute left-3 top-0 flex h-full flex-col justify-between py-8 text-[10px] uppercase tracking-[0.08em]",style:{color:"rgba(16,35,49,0.35)"},children:[g.jsx("span",{children:"[MAX]"}),g.jsx("span",{children:"—"}),g.jsx("span",{children:"—"}),g.jsx("span",{children:"—"}),g.jsx("span",{children:"[MIN]"})]}),g.jsx("div",{className:"absolute bottom-2 left-0 right-0 flex justify-between px-10 text-[10px] uppercase tracking-[0.08em]",style:{color:"rgba(16,35,49,0.4)"},children:["2020","2022","2024","2026"].map(s=>g.jsx("span",{children:s},s))}),g.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:g.jsxs("div",{className:"px-6 py-3 text-center",style:{background:"rgba(248,248,245,0.9)",border:"1px solid rgba(16,35,49,0.14)"},children:[g.jsx("div",{className:"text-[12px] uppercase tracking-[0.12em]",style:{color:"#102331"},children:"Verified trend data pending"}),g.jsx("div",{className:"mt-1 text-[11px]",style:{color:"rgba(16,35,49,0.5)"},children:"Chart will populate with portfolio and benchmark series upon publication."})]})})]})]}),g.jsx("div",{className:"mt-12 overflow-x-auto",children:g.jsxs("table",{className:"w-full min-w-[640px] border-collapse text-left",children:[g.jsx("thead",{children:g.jsxs("tr",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"rgba(16,35,49,0.5)"},children:[g.jsx("th",{className:"py-4 pr-6 font-medium",style:{borderBottom:"1px solid rgba(16,35,49,0.16)"},children:"Year"}),g.jsx("th",{className:"py-4 pr-6 font-medium",style:{borderBottom:"1px solid rgba(16,35,49,0.16)"},children:"Portfolio Value"}),g.jsx("th",{className:"py-4 pr-6 font-medium",style:{borderBottom:"1px solid rgba(16,35,49,0.16)"},children:"Change"}),g.jsx("th",{className:"py-4 font-medium",style:{borderBottom:"1px solid rgba(16,35,49,0.16)"},children:"Notes"})]})}),g.jsx("tbody",{children:PC.map(s=>g.jsxs("tr",{style:{borderBottom:"1px solid rgba(16,35,49,0.1)"},children:[g.jsx("td",{className:"py-5 pr-6 text-[14px] font-medium",style:{color:"#102331"},children:s.year}),g.jsx("td",{className:"py-5 pr-6 text-[14px]",style:{color:"#102331",fontVariantNumeric:"tabular-nums"},children:s.value}),g.jsx("td",{className:"py-5 pr-6 text-[13px]",style:{color:"rgba(16,35,49,0.7)"},children:s.change}),g.jsx("td",{className:"py-5 text-[13px]",style:{color:"rgba(16,35,49,0.6)"},children:s.note})]},s.year))})]})}),g.jsx("p",{className:"mt-6 text-[12px] leading-[1.6]",style:{color:"rgba(16,35,49,0.5)"},children:"Historical performance is not necessarily indicative of future results. Figures will be reconciled with published financial statements."})]})})}const AC=[{title:"Market Risk",desc:"Exposure to broader macroeconomic conditions and market cycles."},{title:"Sector Concentration",desc:"The degree of exposure to individual sectors or asset classes."},{title:"Liquidity",desc:"The ability to adjust the portfolio within appropriate timeframes."},{title:"Operating Risk",desc:"Operational execution across businesses and assets."},{title:"Capital Structure",desc:"The resilience of financing and leverage under stress conditions."}],Vm=["Identify","Assess","Prioritise","Monitor","Respond"];function jC(){return g.jsx("section",{style:{background:"#F1EFEA"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Risk & Resilience"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",style:{color:"#102331"},children:"Performance with resilience."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.7)"},children:"Sustainable performance requires more than pursuing upside. Alrazah considers the resilience of its portfolio against market cycles, sector-specific pressures, operational risks and changing economic conditions."}),g.jsx("div",{className:"mt-14 grid grid-cols-1 gap-px lg:grid-cols-5",style:{background:"rgba(16,35,49,0.12)",border:"1px solid rgba(16,35,49,0.12)"},children:AC.map((n,t)=>g.jsxs("div",{className:"p-7",style:{background:"#F1EFEA"},children:[g.jsxs("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:["0",t+1]}),g.jsx("div",{className:"mt-4 text-[16px] font-semibold leading-[1.25]",style:{color:"#102331"},children:n.title}),g.jsx("p",{className:"mt-3 text-[13px] leading-[1.6]",style:{color:"rgba(16,35,49,0.6)"},children:n.desc})]},n.title))}),g.jsxs("div",{className:"mt-14",children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"rgba(16,35,49,0.5)"},children:"Risk Management Process"}),g.jsx("div",{className:"mt-6 flex flex-col items-stretch gap-px sm:flex-row sm:items-center",style:{background:"rgba(16,35,49,0.14)",border:"1px solid rgba(16,35,49,0.14)"},children:Vm.map((n,t)=>g.jsxs(Qt.Fragment,{children:[g.jsx("div",{className:"flex-1 px-6 py-5 text-center text-[13px] uppercase tracking-[0.12em]",style:{background:"#F8F8F5",color:"#102331"},children:n}),tg.jsxs("div",{className:"p-10",style:{background:"#102331"},children:[g.jsxs("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:["0",t+1]}),g.jsx("div",{className:"mt-5 text-[24px] font-semibold",children:n.title}),g.jsx("p",{className:"mt-4 text-[14px] leading-[1.65]",style:{color:"rgba(248,248,245,0.62)"},children:n.desc})]},n.title))})]})})}const DC=["Capital","Ownership","Development","Performance","Reinvestment","Long-Term Value"];function FC(){return g.jsx("section",{style:{background:"#F1EFEA"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"100px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Long-Term Value"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",style:{color:"#102331"},children:"Built for the long term."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.7)"},children:"Alrazah's investment horizon extends beyond individual reporting periods. We seek to build a portfolio of businesses and assets capable of generating sustainable economic value through disciplined ownership, development and reinvestment."}),g.jsx("div",{className:"mt-16 grid grid-cols-2 gap-px sm:grid-cols-3 lg:grid-cols-6",style:{background:"rgba(16,35,49,0.14)",border:"1px solid rgba(16,35,49,0.14)"},children:DC.map((n,t)=>g.jsxs("div",{className:"relative p-7",style:{background:"#F1EFEA"},children:[g.jsxs("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:["0",t+1]}),g.jsx("div",{className:"mt-4 text-[15px] font-semibold leading-[1.25]",style:{color:"#102331"},children:n})]},n))})]})})}const MC=[{type:"Annual Report",title:"Annual Report 2026",year:"2026",file:"PDF",size:"[SIZE]"},{type:"Financial Statements",title:"Consolidated Financial Statements 2026",year:"2026",file:"PDF",size:"[SIZE]"},{type:"Investor Disclosures",title:"Investor Disclosures 2026",year:"2026",file:"PDF",size:"[SIZE]"},{type:"Corporate Announcements",title:"Corporate Announcements 2026",year:"2026",file:"PDF",size:"[SIZE]"}];function UC(){return g.jsx("section",{style:{background:"#F8F8F5"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Reporting & Transparency"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",style:{color:"#102331"},children:"Performance supported by transparent reporting."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.7)"},children:"Alrazah maintains structured financial and corporate reporting practices designed to provide shareholders and stakeholders with clear information regarding the company's financial position, operating performance and strategic progress."}),g.jsx("div",{className:"mt-12",style:{borderTop:"1px solid rgba(16,35,49,0.16)",borderBottom:"1px solid rgba(16,35,49,0.16)"},children:MC.map(n=>g.jsxs("div",{className:"group grid grid-cols-1 gap-3 py-6 transition-colors duration-150 sm:grid-cols-[2fr_2fr_1fr_1fr_auto] sm:items-center sm:gap-6",style:{borderBottom:"1px solid rgba(16,35,49,0.1)"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.14em]",style:{color:"rgba(16,35,49,0.5)"},children:n.type}),g.jsx("div",{className:"text-[15px] font-medium",style:{color:"#102331"},children:n.title}),g.jsx("div",{className:"text-[13px]",style:{color:"rgba(16,35,49,0.6)"},children:n.year}),g.jsxs("div",{className:"text-[12px] uppercase tracking-[0.1em]",style:{color:"rgba(16,35,49,0.5)"},children:[n.file," · ",n.size]}),g.jsxs("div",{className:"flex items-center gap-2 text-[12px] uppercase tracking-[0.14em]",style:{color:"#102331"},children:[g.jsx("span",{className:"flex h-[18px] w-[14px] items-center justify-center transition-colors duration-150",style:{border:"1px solid rgba(16,35,49,0.4)"}}),"Download",g.jsx("span",{className:"transition-transform duration-150 group-hover:translate-x-1",children:"→"})]})]},n.title))}),g.jsxs("p",{className:"mt-8 max-w-2xl text-[12px] leading-[1.65]",style:{color:"rgba(16,35,49,0.55)"},children:[g.jsx("strong",{style:{color:"#102331"},children:"Performance information:"})," Figures presented on this page should be considered together with Alrazah Holding's published financial statements, annual reports and other relevant disclosures. Historical performance is not necessarily indicative of future results."]})]})})}const BC=[{label:"Asset Management",desc:"Overview →",path:"/our-business/asset-management"},{label:"Investment Strategy",desc:"How we allocate capital →",path:"/our-business/asset-management/investment-strategy"},{label:"Portfolio Performance",desc:"How we measure value →",path:"/our-business/asset-management/portfolio-performance",active:!0},{label:"Our Business",desc:"Explore our sectors →",path:"/our-business"}];function zC(){return g.jsx("section",{style:{background:"#1B252B",color:"#F8F8F5"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"96px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Asset Management"}),g.jsx("h2",{className:"mt-6 max-w-2xl text-[40px] font-medium leading-[1.12] sm:text-[46px]",children:"Explore Alrazah's asset management platform."}),g.jsx("div",{className:"mt-14 grid grid-cols-1 gap-px sm:grid-cols-2 lg:grid-cols-4",style:{background:"rgba(248,248,245,0.14)"},children:BC.map(n=>g.jsxs(Yt,{to:n.path,className:"group block p-8 transition-colors duration-150",style:{background:n.active?"#102331":"#1B252B"},children:[n.active&&g.jsx("div",{className:"mb-3 text-[11px] uppercase tracking-[0.14em]",style:{color:"#A78B55"},children:"Current Page"}),g.jsx("div",{className:"text-[18px] font-semibold",children:n.label}),g.jsx("div",{className:"mt-3 text-[13px]",style:{color:"rgba(248,248,245,0.6)"},children:n.desc})]},n.label))})]})})}function $C(){return g.jsx("section",{style:{background:"#E8E9E6"},children:g.jsxs("div",{className:"mx-auto",style:{maxWidth:"1360px",padding:"100px 72px"},children:[g.jsx("div",{className:"text-[11px] uppercase tracking-[0.18em]",style:{color:"#A78B55"},children:"Alrazah Holding"}),g.jsx("h2",{className:"mt-6 max-w-3xl text-[42px] font-medium leading-[1.1] sm:text-[52px]",style:{color:"#102331"},children:"Disciplined capital. Measured performance. Long-term value."}),g.jsx("p",{className:"mt-6 max-w-2xl text-[17px] leading-[1.7]",style:{color:"rgba(16,35,49,0.7)"},children:"Discover how Alrazah's investment approach informs the businesses and assets within its portfolio."}),g.jsxs("div",{className:"mt-10 flex flex-wrap items-center gap-6",children:[g.jsxs(Yt,{to:"/our-business/asset-management/investment-strategy",className:"group inline-flex h-[48px] items-center px-6 text-[12px] uppercase tracking-[0.14em] transition-colors duration-150",style:{background:"#102331",color:"#F8F8F5"},children:["Explore Investment Strategy",g.jsx("span",{className:"ml-3 transition-transform duration-150 group-hover:translate-x-1",children:"→"})]}),g.jsxs(Yt,{to:"/our-business",className:"group inline-flex h-[48px] items-center px-6 text-[12px] uppercase tracking-[0.14em] transition-colors duration-150",style:{border:"1px solid rgba(16,35,49,0.3)",color:"#102331"},children:["View Our Businesses",g.jsx("span",{className:"ml-3 transition-transform duration-150 group-hover:translate-x-1",children:"→"})]})]})]})})}function VC(){return g.jsxs("div",{style:{background:"#F1EFEA"},children:[g.jsx(pC,{}),g.jsxs("main",{style:{paddingTop:"0"},children:[g.jsx(vC,{}),g.jsx(xC,{}),g.jsx(SC,{}),g.jsx(_C,{}),g.jsx(kC,{}),g.jsx(RC,{}),g.jsx(NC,{}),g.jsx(OC,{}),g.jsx(jC,{}),g.jsx(IC,{}),g.jsx(FC,{}),g.jsx(UC,{}),g.jsx(zC,{}),g.jsx($C,{})]}),g.jsx(mC,{})]})}const WC=()=>{const{isLoadingAuth:n,isLoadingPublicSettings:t,authError:s,navigateToLogin:o}=lC();if(t||n)return g.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:g.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(s){if(s.type==="user_not_registered")return g.jsx(uC,{});if(s.type==="auth_required")return o(),null}return g.jsxs(tS,{children:[g.jsx(Oc,{path:"/our-business/asset-management/portfolio-performance",element:g.jsx(VC,{})}),g.jsx(Oc,{path:"*",element:g.jsx(iC,{})})]})};function HC(){return g.jsx(aC,{children:g.jsxs(K1,{client:aE,children:[g.jsxs(lS,{children:[g.jsx(dC,{}),g.jsx(WC,{})]}),g.jsx(S1,{})]})})}vw.createRoot(document.getElementById("root")).render(g.jsx(HC,{}));